Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PKCS5Padding in C#

I need to encrypt a string using DESede pkcs5 padding. However C# only provides PKCS7 padding. So how can I achieve this?

like image 323
Jonny Avatar asked Dec 23 '11 10:12

Jonny


2 Answers

Im no authority on the matter but a quick google turned this up: http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/13a20d89-7d84-4f7d-8f5c-5ae108a7f5cf/

Seems the 7 & 5 padding algs. are the same.

like image 186
Myles McDonnell Avatar answered Nov 14 '22 21:11

Myles McDonnell


Try using a separate library, such as BouncyCastle.

like image 3
ChrisAnnODell Avatar answered Nov 14 '22 22:11

ChrisAnnODell