praveen
praveen

Reputation: 55

how can we decrypting 128 bit AES encrypted text in php with cipher mode ECB and padding mode PKCS7

i fetched such problem in my project

how can we decrypting 128 bit AES encrypted text in php with cipher mode ECB and padding mode PKCS7

Upvotes: 2

Views: 2730

Answers (2)

mcrypt_decrypt('rijndael-128', $key, $data, 'ecb');

You will have to manually remove the padding.

Upvotes: 1

Joey
Joey

Reputation: 354824

You can probably use mcrypt.

But may I ask why you're encrypting with ECB mode at all? Remember the known problems with that?

Upvotes: 2

Related Questions