Edit

Share via


SqlColumnEncryptionCngProvider.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 CNG key store provider. The valid algorithm used to encrypt/decrypt the CEK is 'RSA_OAEP'.

public:
 override cli::array <System::Byte> ^ EncryptColumnEncryptionKey(System::String ^ masterKeyPath, System::String ^ encryptionAlgorithm, cli::array <System::Byte> ^ columnEncryptionKey);
public override byte[] EncryptColumnEncryptionKey (string masterKeyPath, string encryptionAlgorithm, byte[] columnEncryptionKey);
override this.EncryptColumnEncryptionKey : string * string * byte[] -> byte[]
Public Overrides Function EncryptColumnEncryptionKey (masterKeyPath As String, encryptionAlgorithm As String, columnEncryptionKey As Byte()) As Byte()

Parameters

masterKeyPath
String

The master key path.

encryptionAlgorithm
String

The encryption algorithm.

columnEncryptionKey
Byte[]

The encrypted column encryption key.

Returns

Byte[]

The encrypted column encryption key.

Applies to