private void AddSaltToHash(byte[] salt, ref byte[] hash) { if (!saltEnabled) { return; } hash = CryptographyUtility.CombineBytes(salt, hash); }
private void AddSaltToHash(byte[] salt, ref byte[] hash) { HashAlgorithmProviderData data = GetHashAlgorithmProviderDataFromCursor(); if (!data.SaltEnabled) { return; } hash = CryptographyUtility.CombineBytes(salt, hash); }
private void AddSaltToPlainText(ref byte[] salt, ref byte[] plaintext) { if (!saltEnabled) { return; } if (salt == null) { salt = CryptographyUtility.GetRandomBytes(SaltLength); } plaintext = CryptographyUtility.CombineBytes(salt, plaintext); }
private void AddSaltToPlainText(ref byte[] salt, ref byte[] plaintext) { HashAlgorithmProviderData data = GetHashAlgorithmProviderDataFromCursor(); if (!data.SaltEnabled) { return; } if (salt == null) { salt = CryptographyUtility.GetRandomBytes(SaltLength); } plaintext = CryptographyUtility.CombineBytes(salt, plaintext); }