Hi! I have an application developed on BlackBerry JE 4.6.1 that decrypts an information from WebServer using DES algorythm. If I send encrypted information to the server, it is decrypted well. But in case if the server sends an encrypted data, I do not get the correct value after decryption. Key is supposed to be the same and crypted information is sent base64 encoded. During debugging I have found out, that after DESKey is created it's inner data differs from the byte array passed to the constructor. For example if I create the DESKey the next way
String keyStr = "2100000A";
DESKey desKey = new DESKey(keyStr.getBytes()); // pass the byte array {'2','1','0','0','0','0','0','A'}
the method desKey.getData() returns the byte array {'2','1','1','1','1','1','1','@'} that differs from the initial key bytes.
So is it possible for such behavior of the DESKey to be the reason why I can not decrypt data from server?
Thank you.