IsWeakKey() public static method

public static IsWeakKey ( byte key ) : bool
key byte
return bool
示例#1
0
 public DesParameters(byte[] key, int keyOff, int keyLen) : base(key, keyOff, keyLen)
 {
     if (DesParameters.IsWeakKey(key, keyOff))
     {
         throw new ArgumentException("attempt to create weak DES key");
     }
 }
示例#2
0
 public static bool IsWeakKey(byte[] key, int offset, int length)
 {
     for (int i = offset; i < length; i += 8)
     {
         if (DesParameters.IsWeakKey(key, i))
         {
             return(true);
         }
     }
     return(false);
 }
示例#3
0
 public static bool IsWeakKey(byte[] key)
 {
     return(DesParameters.IsWeakKey(key, 0));
 }