What I need is to encrypt string which will show up in 2D barcode(PDF-417) so when someone get an idea to scan it will get nothing readable.
Other requirements:
- should not be complicated
- it should not consist of RSA, PKI infrastructure, key pairs, etc.
It must be simple enough to get rid of the people snooping around, and easy to decrypt for other companies interested in getting that data. They call us, we tell them the standard or give them some simple key which can then be used for decryption.
Probably those companies could use different technologies so it would be good to stick to some standard which is not tied to some special platform or technology.
What do you suggest? Is there some Java class doing encrypt() decrypt() without much complication in achieving high security standards?
I am using Sun's Base64Encoder/Decoder which is to be found in Sun's JRE, to avoid yet another JAR in lib. That's dangerous from point of using OpenJDK or some other's JRE. Besides that, is there another reason I should consider using Apache commons lib with Encoder/Decoder?
You can use Jasypt
With Jasypt, encrypting and checking a password can be as simple as...
Encryption:
Decryption:
Gradle:
Features:
How about this:
Works fine for me and is rather compact.
thanks ive made this class using your code maybe someone finds it userfull
object crypter
Here are some links you can read what Java supports
Encrypting/decrypting a data stream.
JCERefGuide
Java Encryption Examples