DES/3DES算法_.net检测弱密钥

参考文献https://blog.csdn.net/MHSMIE/article/details/52353111?spm=1001.2014.3001.5502

DES/3DES算法_.net检测弱密钥
1 Type t = Type.GetType("System.Security.Cryptography.CryptoAPITransformMode");
2             object obj = t.GetField("Encrypt", BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly).GetValue(t);
3             MethodInfo mi = des3.GetType().GetMethod("_NewEncryptor", BindingFlags.Instance | BindingFlags.NonPublic);
4             ICryptoTransform desCrypt = (ICryptoTransform)mi.Invoke(des3, new object[] { byteKey, CipherMode.ECB, null, 0, obj });
具体代码

 

上一篇:Linux用户对文件进行加密


下一篇:什么是MTTF、MTBF、MTRF?