SqlColumnEncryptionCngProvider.EncryptColumnEncryptionKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 plaintext column encryption key.
Returns
The encrypted column encryption key.