I used a KeyGenerator Class for genereate a key.
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:
byte myPass2= myPass.getBytes("UTF8");
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
Thanks in advance...
Leonardo Ayala R.
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)