it is based on invalid format, try to give correct name structure for instance:
new X500Name("C=DE,O=Organiztion");
Showing posts with label RSA. Show all posts
Showing posts with label RSA. Show all posts
Thursday, March 27, 2014
Tuesday, March 27, 2012
RSA demo / example
This is the implementation of RSA tutorial given at http://www.javamex.com/tutorials/cryptography/rsa_encryption.shtml with little bit of additions so you can use it right out of the box.
For details see "readme.txt" and main() methods avaliable in each class
CLASS: RSAKeyGenerator
Method: void generateKeyPair("<public key file name>","<private key file name>")
CLASS: RSAEncDec
Method: String encrypt("your plane string message", "<location of public key file>")
[Returns the base64 encoded string that you can send easily]
Method: String decrtpt("<above base64 encoded string>", "<location of private key file>")
[Returns original plane string message]
For details see "readme.txt" and main() methods avaliable in each class
Download project at : https://github.com/meamit/rsa-demo
Subscribe to:
Posts (Atom)