hello..i have an issue about encryption key.i have generate a key using secretkey, can it be save to a file?!..does the process are just the same like writing a string to a file?!..and then retrieving the key,does it are the same like reading the file?!..
help on encryption key
Collapse
X
-
Just writing it to a file like writing a String won't work - you'd get the current name of the secretkey-object, but that's it. However, Secretkey has a method called "getEncoded ()" which returns a byte-array. You can save a byte-array to a file (again, don't just print it like a String - you'll get the objects name. Try the Arrays class.) and then read it again from file. You'll have to convert it again, but that's solvable.Originally posted by eyeofsoulhello..i have an issue about encryption key.i have generate a key using secretkey, can it be save to a file?!..does the process are just the same like writing a string to a file?!..and then retrieving the key,does it are the same like reading the file?!..
Greetings,
Nepomuk
Comment