Validate signature with pre-calculated digest

Hello to all!
I'm trying to build a system that signs and validates signatures on large files.
To get a signature i used a pre-calculated digest and was easy, but for validating the same signature i can't discover how to give the pre-calculated digest.
I can't use the normal validate because the java api uses the "JavaUtils.getBytesFromStream" method and try to get all the file to memory.
can someone indicate the solution to this (or explain why don't had a solution, if it is the case)?

Hello!
smullan wrote:
I assume you have tried returning an OctetStreamData wrapped around an InputStream? Yes. I let here the code of the URIDereferencer i'm using.
public class ConstrulinkURIDereferencer implements URIDereferencer {
     private String filesPath;
     private URIDereferencer defaultDereferencer = null;
     public ConstrulinkURIDereferencer(String filesPath) {
          this.filesPath = filesPath;
     public void setURIDereferencer(URIDereferencer defaultDereferencer) {
          this.defaultDereferencer = defaultDereferencer;
     @Override
     public Data dereference(URIReference uriReference, XMLCryptoContext context)
               throws URIReferenceException {
          try {
               String filename = uriReference.getURI();
               File f = new File(filesPath+filename);
               if (!f.exists() && defaultDereferencer!=null) {
                    return defaultDereferencer.dereference(uriReference, context);
               } else {
                    return new OctetStreamData(new FileInputStream(filesPath+filename));
          } catch (FileNotFoundException e) {
               throw new URIReferenceException(e);
}I try to get a file, if that fails i send the request for dereference to the deafult URIDereferencer (the one that was there before).
What i got from seeing the code at Koders the problem was that when we call the method JavaUtils.getBytesFromStream (you can see the stacktrace above) it will read all the bytes of the stream. I didn't see if these bytes are used for something else than the digest.
>
It sounds like it could be a bug. I will try coming up with a sample and debug it further. If you are able to, please also post your code here or send it to [email protected].
I'll try monday to send you a executable code.
Thanks

Similar Messages

  • Send email with pre-calculated Excel

    Hello everybody.
    I'm trying to send an email with a pre-calculated Excel worksheet, generated by an Agent Reporting job.
    But, I don't know how to attach the last generated XLS file, using ABAP.
    We have BW vers. 3.1 so I can't use Information Broadcasting (it would be the perfect solution).
    I've tried to send the pre-calculated results as HTML (following a very good document found in this forum), but the results didn't satisfied the users. I've already read the document about sending a workbook as attachment, but my problem is I don't know where to get the Excel generated by Agent Reporting.
    Can someone help me?
    Thanks in advance.
    Gabriele
    P.S.: This is my first post. I hope my next posts will be for helping someone, not only asking for help...

    Check this link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/7f601a65-0a01-0010-16a5-c369f2a9fa87
    Save it as a PDF file before opening it.
    Hope it helps.
    Regards

  • Key figure with pre-calculated aggregation

    Hello,
    I have to model a key figure with a pre-calculated aggregation, that is, soruce flat files contain explicit values for months, quarters, halfyears and years. The key figure is a percentage (service quality) and the corresponding company department provides me with results for all aggregation levels.
    I think that this case can be modeled with one InfoCube for each aggregation level and a Multicube but I have to create a high number of InfoCubes (aprox. 180).
    I can get the formula that department uses, but it's possible on BW to change standard aggregation (SUM, MAX, MIN)?
    Thanks in advance and regards,
    Alberto Garcia.

    Hi Alberto,
    One of the ways of doing it could be -
    add another field (char) to your cube called at "value Type" & assign different values to it depending upon the time value.
    say Monthly  - value type 1
        Querter  - value type 2
    & so on ...
    keep filling the same key figure.
    at the time of reporting restrict your key figure accordingly with the value type. ( say need only montly key figure value restrict value type to "1")
    hope it helps.
    VC

  • Using pre-calculated web template

    I have a query that takes 20 seconds to load on our web portal.  I've done everything imaginable to optimize performance.  Finally I'm experimenting with pre-calculating the query.  I've created the reporting agent setting, set the calculate parameter to 'HTML for Web Browser', added this to a schedule and successfully ran the schedule.
    Now when I run the corresponding web template on the web it still seems to take the same 20 seconds.  I would think all it has to load now is a static HTML page so it should take 1 or 2 seconds.  How do I know if it's really loading the pre-calculated version or the normal one?  I'm not sure anything is really happening.  Maybe I missed something?  Anybody have experience with this?
    Thanks,
    -Patrick

    I think I figured it out.  I had to add a parameter to my url that was UPDATE_MODE=STORED

  • The item Hierarchical Context Menu does not support pre-calculation

    Hello,
    Trying to download pre-calculated web templates via RepAgent, using the Hierarchical Context Menu feature within the template (populated via control query with Hierarchy) the system returned the following message upon file download:
    "The item Hierarchical Context Menu does not support pre-calculation"
    As a result the Hierarchical Context Menu is not displayed on the downloaded html-files. Navigation not possible.
    Could not find any constraints documented in the online help, at this point.
    Question: is there something missing on our setup or is this really out of scope for precalculation with navigation?
    Any other experiences on that or shall we open OSS-message?
    Best regards,
    Markus
    (We are on BW3.1)

    Hi,
    we have the same problem. Does anybody have any hint or workaround? Is there a solution for this in 3.5 or any upcoming version.
    Any input is appreciated.
    Thanks,
    Stefan

  • Difference between Pre-Calculated Queries in BI 7.0 and BW 3.5

    Hi
    Can somebody tell me the difference between pre-calculated queries (web templates) in BI 7.0 and BW 3.5? Is there any difference in Reporting Agent functionality in creating or scheduling the queries?
    Thanks in advance.

    hi kashi
    u could have searched forum with u r question
    anyway go thru following links
    <b>/community [original link is broken]
    Difference in Delta between BW 3.5 and BI 7.0
    /message/2927917#2927917 [original link is broken]
    How much difference between BW 3.5 and BI 7.0?

  • Pre-calculated query?

    Hello BW Experts,
    how can we do a pre-calculated query? Not a pre-calculated web-template. Not broadcasting after the data is loaded into cube. Just, pre-calculated query. When the user clicks the query in bex. it should show the results immedietly..
    Thanks,
    BWer

    Your best way is to use cache.  You can use the reporting agent background printing to act like you are going to print the query, but it will run it and if the users run the query for the same selection, they will receive the query that accesses the cache.  You can also setup the variables to be changeable during navigation and if they are in the resultset, the users will be able to use cache.  There is a document about this on BW Expert.  Search the forum and there is a post with a link. 
    Thanks,
    Jeff

  • Cpsid_83578r3: Error, "Validate license at Pre-chrome" when installing - Creative Suite 5

    I received this error in Adobe support adviser which I had to download because when my Flash Professional cs5.5 trial download was ready to install, the Adobe installer came up and reported the error "Installer failed to initialise".This is why I had to download adobe support adviser. I have scoured the  web for a week now for a solution but to no avail. Adobe should have a solution to every single one of their problems when I was probably going to spend a good 500-600 pounds on some software where they cannot correct their errors. They should be the experts not me.

    I am having the same problem with my install. I have a Dell XPS 420, dual-cpu, 4gb RAM, dual 500gb HDs, Windows 7 Ultimate. I have CS 5 loaded. I uninstalled it and tried loading CS 5.5, but got the error. I reinstalled CS 5, and tried loading CS 5.5 again - same error. I tried all the the steps listed in the document Install log error "Validate license at Pre-Chrome time" | Creative Suite 5, CS5.5
    * I changed the locale
    * I am an admin - I right clicked the setup.exe and selected "Run as Administrator"
    Still getting the same error.
    Take your pic:
    Token 1: 00-93110-175830122011
    Token 2: 00-23738-211330122011
    Token 3: 00-35045-080831122011

  • Pre-calculated webtemplate problem

    Hi All,
    I've pre-calculated a webtemplate and am able to see the html pages containing data in Reporting agent by choosing the option 'Document Overview'. But when i execute the webtemplate in the browser, i get the following error
    "No precalculated data found for data provider DATAPROVIDER_1".
    The job for pre-calculation has beensuccessful. The URL looks something like this:-
    <b><i>http://ipaddress:port/sap/bw/BEx?sap-language=EN&bsplanguage=EN&CMD=LDOC&TEMPLATE_ID=WEBTEMPLATE_NAME&DATA_MODE=STORED</i></b>
    Could some one please help me out with this problem ? I want to use the pre-calculated webtemplate from the browser.
    Best Regards,
    Sanjay

    Hi,
    I am having the same problem...
    Any help would be appreciated...
    Thanks

  • Pre-calculated webtemplate issue

    Hi All,
    I've pre-calculated a webtemplate with the DATA_MODE = STORED.
    When i execute the webtemplate the first time in the browser,
    data is displayed very fast. But when i click on the next button
    to view the next set of records, it takes a very long time.
    Looks like when the query is executed the first time, precalculated
    data is retrieved. But, when the next set of records are requested,
    the current data is being retrieved.
    Can some please suggest how to tackle this problem ?
    In the webtemplate i have the setting <param name="DATA_MODE" value="STORED"/>
    Thanks in advance,
    sanjay

    Hi,
    I am having the same problem...
    Any help would be appreciated...
    Thanks

  • Information Broadcaster Pre-Calculation Server

    We just upgraded to version 3.5. I have a need to broadcast workbooks to several users. I setup a test precaluation server on my PC. I am not sure exactly what the function of these server. Are the workbooks actualy stored on this "server" or the BW Server. Does anyone know what functions the pre caluation server does. Also is there any suggestion of where folks locate this in their production landscape. It seem to only run on a windows environment. Any insight would be greatly appreciated.
    Thanks,
    Steve

    Steve,
    To calculate an excel workbook, BEx analyzer is launched and reports are run.  This is done on the pre-calculation server.  The pre-calculation service interacts with the desktop, launches analyser, runs the reports, saves the excel workbook on the server which is then broadcasted.
    For a production environment, recommend running this on either a dedicated windows based PC or a shared server.  It should be up at all times otherwise the boradcast will fail.
    Aneesh

  • Validate license at Pre-chrome error

    I downloaded the Photoshop CS5 trial and after the 30 days decided to buy it.  I entered my software key just fine and the program would not open.  So, I unistalled it and installed it again, and it still will not open.
    I downloaded the Adobe Support Advisor and this is the error that occurs every time I try to open the program.
    cpsid_83578r3: Error, "Validate license at Pre-chrome" when installing - Creative Suite 5
    According to the Adobe webiste, this article should be followed:
    http://kb2.adobe.com/cps/835/cpsid_83578.html
    I followed all of the steps in the article linked above and it is still not working.  Still unable to get any customer support on the phone.
    Has anyone else come across this?
    I'm on a MacBook pro v 10.6.7 and the trial ran just fine.

    I have just  installed the CSS 5.5 and am getting the same error and have followed directions of your post and there is no change in my locate for I am in the USA.
    I have tried disabling my start-up menu, disabled my firewall and anti-virus program and still have the same problem with cpsid_83578r3 error.
    I give up on trying to install it. I am taking it back to the store from which I paid a fortune and demand my money back and this will be the last time that I buy an adobe product again.
    They can go screw themselves for I am tired and worn out with all the so-called solutions....Adobe ought to be ashamed of themselves for issuing a product at such a high price and to see it have problems installing on Windows 7 64 Bit Machine (Ultimate Edition of Windows0
    LDM

  • Web Template Pre Calculation

    Hi,
    We have six chart items in one web template. Out of these six charts we want to run pre calculation for only two Charts as these are quite slow. Is there any way to achieve this.
    can control query or variable help us in this matter?
    Please advise.
    regards,
    Jeet

    You cannot select individual data providers to be pre-calculated, the whole template will have to be cached.
    Work around is to have the slow charts in a seperate frame and use iFrames to integrate it with the main template which has the rest 4 charts.
    The best soltn is to pre-calculate the whole template..

  • [Inf. Broadcasting]: Pre-Calculated Report.

    Dear Expert,
    Can you all kindly suggest me what i've to do ?
    I have information broadcasting with the setting like this :
    Distribution type : Broadcast E-Mail
    Output format : Online link to current Data.
    With the kind of that setting, the recipient will get the email whose the content is the link to access report.
    For my case :
    1. User Get email whose content is the link.
    2. User click that link.
    3. User goes to the BW Website.
    4. User key-in the parameter.
    5. User run the report.
    6. Report is displayed.
    With the same case, could i make the proccedure like this :
    1. User Get email whose content is the link.
    2. User click that link.
    3. User goes to the BW Website.
    6. Report is displayed.
    It means that BW has pre-calculated the report before user access the report. How can i make it ?
    Could somebody help me to solve the kind of this problem please .. :).
    Or
    Is that any other ways to do the same like my requirement above ?
    Many tks for the attention.
    Best regards,,
    Niel
    Message was edited by:
            Niel

    Hi,
    Check this link.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/fcf3ac90-0201-0010-cd8c-a591d58621c3
    http://help.sap.com/saphelp_nw04/helpdata/en/3a/0e044017355c0ce10000000a1550b0/frameset.htm

  • SAP BW Pre-calculation Server Not Working as Expected

    Hi All,
    It has already been 2 months since we have installed our pre-calculation servers. We have been bumping to issue with our server showing as "At Capacity" after a few runs of workbooks. Then we need to restart the service in order to resume the pre-calculation. Something really dumb is that any workbooks that failed during that time will not get pre-calculated again.
    This is really bugging me as every morning when I know, there is some broadcasting, then I need to start monitoring the queue, to see if the symptoms of only a few workbooks (usually 10 workbooks) being able to calculate before I need to restart the service.
    Please help as I am really in a dire situation.
    David Yee

    dk00111 wrote:
    Ah, I forgot to cast the correctAnswer as a double. Thanks, it works now! (disregard the username change)I sense you're still misunderstanding, so I decided to follow up.
    The issue isn't that you weren't casting your expression to a double before assigning to correctAnswer. That cast is implicit as an integer is automatically promoted to a double, since it is a widening conversion (see here).
    What you had before was like this:
    double d = 1 / 5;
    System.out.println(d); //0.0In this case, we have an integer divided by an integer, and so the result is (naturally!) an integer. Since 1 / 5 is truncated to 0, that's the result of the expression.
    "Casting to a double" would be this:
    d = (double)(1 / 5);
    System.out.println(d); //0.0But that's no different! The cast is pointless, as it happens anyway when you assign the result of the expression to d. 1 / 5 is still occurring with integer operands.
    Instead, based on the fact that it worked, I'm guessing what you did was this:
    d = (double)1 / 5;
    System.out.println(d); //0.2 That's not casting the result of (1 / 5), it's casting 1 to a double, and then dividing by 5. It's equivalent to this:
    d = ( (double) 1 ) / 5;Since now one of the operands is a double, the result of the expression is a double, so you get the expected 0.2.
    You could get the same result by doing this in your code:
    double correctAnswer = 1.0 / x;As the literal 1.0 is obviously not an integer, but a double, so x is promoted to a double and the division occurs on two doubles instead.

Maybe you are looking for

  • Satellite P305 - DVD drive missing, Registry method attempted

    My satellite P305 lost the DVD icon in the My Computer. So I tried to fix it using the "Registry-Method" I've seen all over the forums, but it did not work as I only found a "lower" I think not sure the name But not the "higher" second registry value

  • Samsung BD-P2550 Blu-ray player

    Hello, Would a Best Buy employee be able to enlighten me whether this player was discontinued or just simply not in stock?  This player is available on your website, for local pick-up.  However, when you actually go to choose a store, most stores don

  • Macbook Pro 13 making soft creepy noise continously

    Hi, My Macbook pro 13 is making soft (not exactly), creepy (Like something vibrating inside), continuous noise. We cound not hear it normally, but when I am sitting in office (silent area) i can hear it clearly and its really annoying. FanControl sho

  • Purchasing from itunes in another country

    Less a question and more a point. It is transparently ridiculous that inter-country purchases cannot be made both in terms of a service to customers to exercise choice and the 'bad taste' that these restrictive practices leave in the mouth of consume

  • Automate cisco configuration

    I want to automate copy custom backup configuration (custom-confg) to running-config at a reccuring date