SqlColumnEncryptionCspProvider.EncryptColumnEncryptionKey Method

Definition

Encrypts the given plain text column encryption key using an asymmetric key specified by the key path and the specified algorithm. The key path will be in the format of [ProviderName]/KeyIdentifier and should be an asymmetric key stored in the specified CSP provider. The valid algorithm used to encrypt/decrypt the CEK is 'RSA_OAEP'.

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

Parameters

masterKeyPath
String

The master key path.

encryptionAlgorithm
String

The encryption algorithm.

columnEncryptionKey
Byte[]

The plaintext column encryption key.

Returns

Byte[]

The encrypted column encryption key.

Applies to

Produkt Verzie
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