Dear Friends,
I used a KeyGenerator Class for genereate a key.
example:
Key clave = keyGen.generateKey();
and a Cipher Class too, you can see:
Cipher cifrar = Cipher.getInstance("DES/ECB/PKCS5Padding");
Finally I encripted my string like this:
String myPass="leo2013";
byte[] myPass2= myPass.getBytes("UTF8");
cifrar.init(Cipher.ENCRYPT_MODE, clave);
byte[] cipherText = cifrar.doFinal(mPass2);
I need to SAVE the CLAVE object in a Data Base because I need to decrypt in ahoter Class myPass.
Please anyone know that how I can save the Clave Object to a database and
recover myPass???
Thanks in advance...
Att:
Leonardo Ayala R.