Skip to content

Latest commit

 

History

History
31 lines (18 loc) · 800 Bytes

README.md

File metadata and controls

31 lines (18 loc) · 800 Bytes

ObjC-PyCrypto

Port of the PyCrypto AES Cipher (only CFB Mode) to ObjC to support encryption/descryption between Python and Objective-C (and Java) without the hassle of using CommonCrypto or OpenSSL

Important

This library does currently only support AES in CFB mode and is testet agains PyCrypto (AES.MODE_CFB) and Java's BouncyCastle (AES/CFB8/NoPadding)

ObjC-PyCrypto:

TBD

python code tested:

IV = '0' * 16
cipher = AES.new(mySecret, AES.MODE_CFB, IV)

Java code tested:

byte[] IV = new byte[16];
for (int i = 0; i < IV; i++)
    IV[i] = (byte) i;

IvParameterSpec iv = new IvParameterSpec(IV);
Cipher cipher = Cipher.getInstance("AES/CFB8/NoPadding");
cipher.init(mode, mySecret, iv);