Encrypt in Objective-C / Decrypt in Ruby using anything

前端 未结 4 1290
梦如初夏
梦如初夏 2021-01-01 07:26

We are using this code to encrypt in Objective-C on the iPhone:

- (NSMutableData*) EncryptAES: (NSString *) key
{
    char keyPtr[kCCKeySizeAES128+1];
    bz         


        
4条回答
  •  梦毁少年i
    2021-01-01 07:36

    I haven't done what you are doing, at least not exactly, but the following could be worth a try.

    require 'crypt/rijndael'
    require 'Base64'
    rijndael = Crypt::Rijndael.new("samepassword")
    decryptedBlock = rijndael.decrypt_block(Base64.decode64("encrypted-b64-encoded-data"))
    

提交回复
热议问题