tebru / aes-encryption

AES Encryption in PHP
12 stars 5 forks source link

Given final block not properly padded. #5

Open mridah opened 6 years ago

mridah commented 6 years ago

It gives me encrypted strings like

U2FsdGVkX18t7m4RKL0DRM46yjp1gmddZFhFQNBugF2uDvR0sD6txedKmmbpTKMp2+4JODOuHqSMJgDwPJ0xNA==

But I can't decrypt it. Even when using services like https://www.devglan.com/online-tools/aes-encryption-decryption, it gives the following error:

Given final block not properly padded. Such issues can arise if a bad key is used during decryption.

How to resolve this ? how can i get a base64 encoded string ? @natebrunette

natebrunette commented 5 years ago

Sorry for the late response. Are you using the library to encrypt and decrypt? If not, it may not work if the steps for encryption are different.