I use the following code to initialize encryption...
Dim symmetricKey As New System.Security.Cryptography.RijndaelManaged()
With symmetricKey
.Key = Encoding.ASCII.GetBytes(Key)
.IV = Encoding.ASCII.GetBytes(IV)
.Mode = CipherMode.CBC
.BlockSize = 128
.KeySize = 128
.Padding = PaddingMode.PKCS7
End With
The requirement is to use PKCS5. Padding modes in vb.net only include
So I don't think there is a method for PKCS5. Is there any way to add it, or do I need to write an encryption method myself? If so - how do I write that? Is there a reliable DLL that will support it?
PKCS7 padding and PKCS5 padding are the same thing. In this context they are synonyms.
EDIT:
The PKCS#7 padding is described in the PKCS#7 spec in section 10.3. PKCS#5 padding is described in the PKCS#5 spec in section 6.1.1 step 4. As you can see by examination, the padding algorithms are identical.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With