The follow line allow me to generate a SecretKey
SecretKey key = KeyGenerator.getInstance("DES").generateKey();
But I want to generate a SecretKey related to a specific String.
For example
String myKeyStr="abcde";
SecretKey mykey2=keyGeneratedFrom(myKeyStr);
Obviously the SecretKey generation should have a 1:1 link to avoid issue during the decryption.
I have no idea of how to solve this problem.
Could you help me?