SqlColumnEncryptionCngProvider::EncryptColumnEncryptionKey Method (String^, String^, array<Byte>^)

 

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'.

Namespace:   System.Data.SqlClient
Assembly:  System.Data (in System.Data.dll)

public:
virtual array<unsigned char>^ EncryptColumnEncryptionKey(
	String^ masterKeyPath,
	String^ encryptionAlgorithm,
	array<unsigned char>^ columnEncryptionKey
) override

Parameters

masterKeyPath
Type: System::String^

The master key path.

encryptionAlgorithm
Type: System::String^

The encryption algorithm.

columnEncryptionKey
Type: array<System::Byte>^

The encrypted column encryption key.

Return Value

Type: array<System::Byte>^

The encrypted column encryption key.

.NET Framework
Available since 4.6.1
Return to top
Show: