20 references to SqlSecurityUtility
System.Data (20)
fx\src\data\System\Data\SqlClient\SqlAeadAes256CbcHmac256Algorithm.cs (3)
158
SqlSecurityUtility
.GetHMACWithSHA256(plainText, _columnEncryptionKey.IVKey, iv);
161
SqlSecurityUtility
.GenerateRandomBytes(iv);
302
if (!
SqlSecurityUtility
.CompareBytes(authenticationTag, cipherText, authenticationTagOffset, authenticationTag.Length)) {
fx\src\data\System\Data\SqlClient\SqlAeadAes256CbcHmac256EncryptionKey.cs (3)
88
SqlSecurityUtility
.GetHMACWithSHA256(Encoding.Unicode.GetBytes(encryptionKeySalt), RootKey, buff1);
94
SqlSecurityUtility
.GetHMACWithSHA256(Encoding.Unicode.GetBytes(macKeySalt),RootKey,buff2);
100
SqlSecurityUtility
.GetHMACWithSHA256(Encoding.Unicode.GetBytes(ivKeySalt),RootKey,buff3);
fx\src\data\System\Data\SqlClient\SqlAeadAes256CbcHmac256Factory.cs (1)
50
StringBuilder algorithmKeyBuilder = new StringBuilder(Convert.ToBase64String(encryptionKey.RootKey),
SqlSecurityUtility
.GetBase64LengthFromByteLength(encryptionKey.RootKey.Length) + 4/*separators, type and version*/);
fx\src\data\System\Data\SqlClient\SqlAes256CbcFactory.cs (1)
54
StringBuilder algorithmKeyBuilder = new StringBuilder(Convert.ToBase64String(encryptionKey.RootKey),
SqlSecurityUtility
.GetBase64LengthFromByteLength(encryptionKey.RootKey.Length) + 4/*separators, type and version*/);
fx\src\data\System\Data\SqlClient\SqlClientSymmetricKey.cs (1)
58
return
SqlSecurityUtility
.GetSHA256Hash(RootKey);
fx\src\data\System\Data\SqlClient\SqlCommand.cs (3)
3923
SqlSecurityUtility
.VerifyColumnMasterKeySignature(providerName, keyPath, servername, isRequestedByEnclave, keySignature);
4014
SqlSecurityUtility
.DecryptSymmetricKey(sqlParameter.CipherMetadata, this._activeConnection.DataSource);
5183
byte[] unencryptedBytes =
SqlSecurityUtility
.DecryptWithKey(rec.value.ByteArray, rec.cipherMD, _activeConnection.DataSource);
fx\src\data\System\Data\SqlClient\SqlSecurityUtility.cs (2)
158
SqlSecurityUtility
.DecryptSymmetricKey(md, serverName);
192
SqlSecurityUtility
.DecryptSymmetricKey(md, serverName);
fx\src\data\System\Data\SqlClient\SqlSymmetricKeyCache.cs (2)
41
StringBuilder cacheLookupKeyBuilder = new StringBuilder(serverName, capacity: serverName.Length +
SqlSecurityUtility
.GetBase64LengthFromByteLength(keyInfo.encryptedKey.Length) + keyInfo.keyStoreName.Length + 2/*separators*/);
94
string keyHex =
SqlSecurityUtility
.GetBytesAsString(keyInfo.encryptedKey, fLast:true, countOfBytes:10);
fx\src\data\System\Data\SqlClient\TdsParser.cs (4)
5351
byte[] unencryptedBytes =
SqlSecurityUtility
.DecryptWithKey(b, md.cipherMD, _connHandler.ConnectionOptions.DataSource);
8271
encryptedValue =
SqlSecurityUtility
.EncryptWithKey(serializedValue, param.CipherMetadata, _connHandler.ConnectionOptions.DataSource);
9157
SqlSecurityUtility
.DecryptSymmetricKey(md.cipherMD, serverName);
9483
return
SqlSecurityUtility
.EncryptWithKey(