Microsoft.Data.SqlClient.SqlColumnEncryptionKeyStoreProvider
Base class for all key store providers. A custom provider must derive from this class and override its member functions and then register it using RegisterColumnEncryptionKeyStoreProviders, RegisterColumnEncryptionKeyStoreProvidersOnConnection or RegisterColumnEncryptionKeyStoreProvidersOnCommand. For details see, Always Encrypted.
Gets or sets the lifespan of the decrypted column encryption key in the cache. Once the timespan has elapsed, the decrypted column encryption key is discarded and must be revalidated.
protected SqlColumnEncryptionKeyStoreProvider()
public abstract byte[] DecryptColumnEncryptionKey(string masterKeyPath, string encryptionAlgorithm, byte[] encryptedColumnEncryptionKey)
Decrypts the specified encrypted value of a column encryption key. The encrypted value is expected to be encrypted using the column master key with the specified key path and using the specified algorithm.
public abstract byte[] EncryptColumnEncryptionKey(string masterKeyPath, string encryptionAlgorithm, byte[] columnEncryptionKey)
Encrypts a column encryption key using the column master key with the specified key path and using the specified algorithm.
public virtual byte[] SignColumnMasterKeyMetadata(string masterKeyPath, bool allowEnclaveComputations)
When implemented in a derived class, digitally signs the column master key metadata with the column master key referenced by the masterKeyPath parameter. The input values used to generate the signature should be the specified values of the masterKeyPath and allowEnclaveComputations parameters.
public virtual bool VerifyColumnMasterKeyMetadata(string masterKeyPath, bool allowEnclaveComputations, byte[] signature)
When implemented in a derived class, this method is expected to verify the specified signature is valid for the column master key with the specified key path and the specified enclave behavior. The default implementation throws `NotImplementedException`.