Decrypting Java AES Encryption in Objective-C -
this question might've asked several times, have yet discover answer solved problem.
scenario: have encrypted file server, using java. goal decrypt file in iphone (objective-c).
i tried decrypt using fbencryptoraes no avail.
here's decryption in objective-c:
nsdata *returndata = [fbencryptoraes decryptdata:stream key:key iv:nil];
the stream
encrypted nsdata obtained server, key
aes.
i have written equivalent java code, , decrypt data correctly using , therefore verify key
i'm using identical byte-per-byte. here's said java code:
secretkeyspec key = new secretkeyspec(key, "aes"); cipher cipher = cipher.getinstance("aes"); cipher.init(cipher.decrypt_mode, key); cipherin = new cipherinputstream(new fileinputstream(<decrypted-file>, cipher);
any suggestion?
thanks.
Comments
Post a Comment