SqlColumnEncryptionCertificateStoreProvider.EncryptColumnEncryptionKey Method

Definition

Encrypts a column encryption key using the certificate with the specified key path and using the specified algorithm. The format of the key path should be "Local Machine/My/<certificate_thumbprint>" or "Current User/My/<certificate_thumbprint>".

C#
public override byte[] EncryptColumnEncryptionKey (string masterKeyPath, string encryptionAlgorithm, byte[] columnEncryptionKey);

Parameters

masterKeyPath
String

The master key path.

encryptionAlgorithm
String

The encryption algorithm. Currently, the only valid value is: RSA_OAEP

columnEncryptionKey
Byte[]

The plaintext column encryption key.

Returns

Byte[]

Returns Byte . The encrypted column encryption key.

Applies to

Produk Versi
SqlClient .NET Core 1.0, 1.1, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Framework 1.0, 1.1, 2.0, 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2
SqlClient .NET Standard 2.1, 3.0, 3.1, 4.0, 4.1, 5.0, 5.1, 5.2