ios - AES encryption security provider error -
ok. have experienced problem quite sometime. feeling getting close, need pointed in right direction. using cool third party library called fbencryptorae:
nsstring * encryptedmessage = [fbencryptoraes encryptbase64string:localquery keystring:key separatelines:no];
when post encrypted query server, following error:
the aes/cbc/pkcs7padding algorithm not supported security provider have chosen
here's constraints are:
128 bit key aes/cbc/pkcs5padding, base64 coldfusion
based off of readings, pkcs5padding/ pkcs7padding same thing?? if kind , me understand:
- why getting error.
- is there sample code can view based off of constraints have? appreciate help.
pkcs5padding
, pkcs7padding
produce same result aes, same.
if using cbc
iv
required. how iv
made same both encryption on ios , decryption on server? fbencryptoraes
has iv
capability (raw data) not (base64) defaulting "nil" (from docs). must correct. since fbencryptoraes
not support need need use (raw data) api , base64 encode nsdata
method base64encodeddatawithoptions:
.
ensure key
, iv
required size, aes128 16 bytes each. wrappers expand undersize keys there no standard that, common crypto not.
hex dump input , outputs of all parameters , data on both sides ensure match.
the problem wrappers rather opaque being done , can create interoperability problems. reason use common crypto , nsdata
base64 encoding/decoding know being done.
Comments
Post a Comment