protected void AddSaltToHash(byte[] salt, ref byte[] hash) { if (!this.saltEnabled) { return; } hash = CryptographyUtility.CombineBytes(salt, hash); }
protected void AddSaltToPlainText(ref byte[] salt, ref byte[] plaintext) { if (!this.saltEnabled) { return; } if (salt == null) { salt = CryptographyUtility.GetRandomBytes(this.saltLength); } plaintext = CryptographyUtility.CombineBytes(salt, plaintext); }