本博文列出了.NET下常用的对称加密算法,并将它们制作成小DEMO,希望能对大家有所帮助. 公共代码[csharp]static byte[] CreateKey(int num) { byte[] result = new byte[num]; Random rand = new Random(); for (int i = 0; i < num; i++) { result[i] = (Byte)rand.Next(1, 256); }…
JavaScript代码 DES.js /** * Created by Andy on 2017/11/30. */ /** * DES加密/解密 * @Copyright Copyright (c) 2006 * @author Guapo * @see DESCore */ /* * encrypt the string to string made up of hex * return the encrypted string */ function strEnc(data,fir…