Does anyone know if i can take an alphanumeric string to generate a DES key to encrypt data? It has to form the same key everytime so i can encrypt and decrypt the information....
when i crease a key and print it out it becomes:
Key: -84-19051151140309911110946115117110469911412111211611146112114111118105100101114466869837510112110752-10053-382110
4-1042019103107101121116029166120112117114029166-84-1323-86884-322001201120008-387481-8847103-3697
(all one line of course)
I'm not sure if i can get toHexString as i'm using J2SDK1.3.1_02 with JCE1.2.2 and i think a lot of stuff was added from SDK1.4 onwards.
gives me standard cannot resolve sysmbol. I dont think what i'm trying to do is hard, just I've never attempted encryption before and i'm finding it hard going. Can't find many good guides online (thanks pete yours was a help yesterday as a beginning)
=====
>All i really need is to generate a random DES key and use that to encrypt plain text to ciphertext. I then load a 16character alphanumeric string and create a new DES key from that which i use to encrypt the first key. The resulting data i need to cast to a string (hopefully around 16-32 characters max), store half of it back into the database with the ciphertext and print the other half out.
That way i can use the printout combined with the other key data in the dabase and decrypt it again with the DES Key from the loaded 16character string. This should reform the original random DES key which was never saved and be able to decrypt the cipher text back to plain text.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.