Beispiel #1
0
 /// <summary>
 /// 通过密码得到一个通用128位Aes密钥
 /// </summary>
 /// <param name="passwd">密码</param>
 /// <returns>返回密钥</returns>
 public static byte[] GenAesKey128(byte[] passwd)
 {
     return(MD5Util.GetMd5Digest(passwd));
 }
Beispiel #2
0
 /// <summary>
 /// 通过密码得到一个通用64位Aes密钥
 /// </summary>
 /// <param name="passwd">密码</param>
 /// <returns>返回密钥</returns>
 public static byte[] GenAesKey64(byte[] passwd)
 {
     byte[] dg = MD5Util.GetMd5Digest(passwd);
     return(dg.SubBytes(0, 8));
 }