예제 #1
0
 void AddSaltToHash(byte[] salt, ref byte[] hash)
 {
     if (this.saltEnabled)
     {
         hash = CryptographyUtility.CombineBytes(salt, hash);
     }
 }
예제 #2
0
 void AddSaltToPlainText(ref byte[] salt, ref byte[] plaintext)
 {
     if (this.saltEnabled)
     {
         if (salt == null)
         {
             salt = CryptographyUtility.GetRandomBytes(0x10);
         }
         plaintext = CryptographyUtility.CombineBytes(salt, plaintext);
     }
 }