GetStrongKey() 정적인 개인적인 메소드

static private GetStrongKey ( ) : byte[]
리턴 byte[]
예제 #1
0
 internal DESTransform(SymmetricAlgorithm symmAlgo, bool encryption, byte[] key, byte[] iv) : base(symmAlgo, encryption, iv)
 {
     byte[] array = null;
     if (key == null)
     {
         key   = DESTransform.GetStrongKey();
         array = key;
     }
     if (DES.IsWeakKey(key) || DES.IsSemiWeakKey(key))
     {
         string text = Locale.GetText("This is a known weak, or semi-weak, key.");
         throw new CryptographicException(text);
     }
     if (array == null)
     {
         array = (byte[])key.Clone();
     }
     this.keySchedule = new byte[DESTransform.KEY_BYTE_SIZE * 16];
     this.byteBuff    = new byte[DESTransform.BLOCK_BYTE_SIZE];
     this.dwordBuff   = new uint[DESTransform.BLOCK_BYTE_SIZE / 4];
     this.SetKey(array);
 }
예제 #2
0
 public override void GenerateKey()
 {
     KeyValue = DESTransform.GetStrongKey();
 }