Triple DES encryption

泪湿孤枕 提交于 2019-12-04 07:46:22

The clue is in the name of the function you're using: TripleDesEncryptOneBlock

This method only encrypts one block of the input string (8 bytes or 64 bits). To encrypt the entire string you need to chain multiple calls to this method.

Use this:

byte[] enc = ic.TransformFinalBlock(plainText, 0, plainText.Length);

I hope it will encrypt/decrypt your whole string. Also you will need not to call this method multiple times

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!