I want to provide my application with simple licensing mechanism based on RSA algorithm.
Are there any free RSA libraries?
I want to provide my application with simple licensing mechanism based on RSA algorithm.
Are there any free RSA libraries?
I hate people who answer with a google link, but I think in this case it's appropriate: http://www.google.com/search?hl=en&site=&q=java%20rsa
You can find several RSA examples and libraries in the first page of results; most of them have liberal licenses.
I recently used the open source framework Jasypt http://www.jasypt.org/index.html. This framework also work very well together with Spring and Hibernate
Is there a particular reason not to use javax.crypto?
KeyPair keys = KeyPairGenerator.getInstance("RSA").generateKeyPair();
Cipher cipher = Cipher.getInstance("RSA");
cipher.init(Cipher.ENCRYPT_MODE, keys.getPublic());
byte[] encrypted = cipher.doFinal(rawData);
If for some reason you don't want to use what is build into the platform, then Keyczar is generally the most suggested / best solution for any other sort of cryptographic needs.