How to create an AES key with an initial value so that whenever I generate a key with the same initial value, I can get the same AES key?
I want to generate this key for my Blackberry Pearl 8100 device.
I cannot generate an AES key using AESKey (keyData).
And whenever I print it either in the form of String or byte [], I cannot generate it. (print it) The actual key is never printed.
What can be done to get the key?
Update
I tried to create an AESKey by passing a byte [] from my data, as described below:
AESKey key = new AESKey(keyData);
Every time I get the same key, that's right.
Now, using this key, I encrypt the data. Every time I encrypt, I get a different encryption value. Here is my problem. How can I get the same data every time after encryption so that I can send it to the server?
Update
I cannot generate an AES key using AESKey (keyData).
And whenever I print it either in the form of String or byte [], I cannot generate it. (print it) The actual key is never printed.
What can be done to get the key?
source
share