Signature in Java

Last post 08-25-2008 11:08 PM by onlinesignature. 3 replies.

Sort Posts:

  • Signature in Java

    11-24-2006, 1:40 PM
    • Member
      70 point Member
    • crino
    • Member since 03-15-2006, 4:10 PM
    • Rome, Italy
    • Posts 15

    I've this code:
     

    Signature sigVer = Signature.getInstance("SHA1withRSA");
    sigVer.initVerify(publicKey);
    sigVer.update(barrayToEncrypt);
    result = sigVer.verify(barrayToVerify);
     

    how can convert to C# (ASP.NET 2.0)??
    I tried with:

    RSACryptoServiceProvider RSA = (RSACryptoServiceProvider)publicKey.Key; //publicKey is get from certificate file with X509Certificate2 class
    but wheni try to call RSA.Encrypt() i get 'The key status is invalid' or something like this

    Any idea?? :(

    crino
  • Re: Signature in Java

    02-07-2007, 6:30 AM
    • Contributor
      2,919 point Contributor
    • jcw14
    • Member since 05-02-2005, 4:38 AM
    • Posts 577

    You asked this a long time ago, so you've probably worked out the answer by now, but you do something similar to this:

      RSACryptoServiceProvider rsa = new RSACryptoServiceProvider();
      rsa.FromXmlString(certificate.PublicKey.Key.ToXmlString(false));

     

     

  • Re: Signature in Java

    09-12-2007, 5:53 AM
    • Member
      6 point Member
    • avaya001
    • Member since 05-05-2007, 6:19 PM
    • Posts 5

    Hi, I am trying to do something similar to this and am finding very little useful information. Any help appreciated!

    I am trying to sign and encrypt data using X509 Certs in .Net 2.0 and send the info to a Java webservice.

    I need to do the following:

    Sign the data with the my private key from my cert and get the signature with SHA1 with RSA format
    Encrypt the data using AES with a random generated key
    Encrypt the random gen AES key using the recipients public key
    Send the webervice the signed, encrypted data and the signature

    I have succeeded in encrypting and decrypting the data using the certs. The problem I have is getting the signature from my cert's private key. Any help on how to achieve this?

    Thanks
    Stephen

  • Re: Signature in Java

    08-25-2008, 11:08 PM

    http://mysignature.brinkster.net (For ASP.NET 1.1 2.0) is an ASP.NET Web Custom Control that creates an online signature box to capture signature. Users can now sign documents online using mouse as a pen!. Your clients can use this signature box to sign or upload their signature in your web page. Pure .NET code and HTML based, no plugins, activeX required.

    It is compatible with all browsers and available with full source code @ $19.00 no extra license fees required. So if you are looking for online signature capture website control then visit http://mysignature.brinkster.net

Page 1 of 1 (4 items)