Federal government organizations are now required to use FIPS 197, Advanced Encryption Standard (AES), which was approved for Federal government use in November 2001 to store encrypted data. In one of my assignment I was suppose to write a solution that can encrypt string based on some password/passphrase.
There are a lot of examples for AES in the Internet (Google is a grate thing). The most correct and simple I found in this one Using the Java Cryptographic Extensions, which holds the following code
What I didn’t find, is how can I base my encryption on the external password.
The solution is not to hard. Just replace
That did the job. Enjoy