cancel
Showing results for 
Search instead for 
Did you mean: 

Hello How can I use padding PKCS7 in the AES library?

Hafsh.2
Associate II
 
2 REPLIES 2
Bubbles
ST Employee

Hi @Community member​,

sorry but this is a strange question. PKCS is all about public key cryptography, while the AES is a symmetric cipher. You can add the padding manually if you wish, and then use the AES cryptography primitive to encrypt the message. There is no high level API to do that, because it's not a common use case.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

You'd need to pad to the inherent line width, 16 bytes for AES-128, due to how the cipher works.

CTR mode works differently in that it doesn't directly act on the data, but generates a pattern.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..