//------------------------------------------------------------------------------ // // Copyright (c) Microsoft Corporation. All rights reserved. // // balnee // krishnib //------------------------------------------------------------------------------ namespace System.Data.SqlClient { using System; /// /// Abstract base class for all column encryption Key Store providers. It exposes two functions /// 1. DecryptColumnEncryptionKey - This is the function used by SqlClient under the covers to decrypt encrypted column encryption key blob. /// 2. EncryptColumnEncryptionKey - This will be used by client tools that generate DDL for customers /// public abstract class SqlColumnEncryptionKeyStoreProvider { /// /// This function must be implemented by the corresponding Key Store providers. This function should use an asymmetric key identified by the key path /// and decrypt an encrypted column encryption key with a given encryption algorithm. /// /// Complete path of an asymmetric key. Path format is specific to a key store provider. /// Asymmetric Key Encryption Algorithm /// Encrypted Column Encryption Key /// Plain text column encryption key public abstract byte[] DecryptColumnEncryptionKey(string masterKeyPath, string encryptionAlgorithm, byte[] encryptedColumnEncryptionKey); /// /// This function must be implemented by the corresponding Key Store providers. This function should use an asymmetric key identified by a key path /// and encrypt a plain text column encryption key with a given asymmetric key encryption algorithm. /// /// Complete path of an asymmetric key. Path format is specific to a key store provider. /// Asymmetric Key Encryption Algorithm /// Plain text column encryption key to be encrypted /// Encrypted column encryption key public abstract byte[] EncryptColumnEncryptionKey(string masterKeyPath, string encryptionAlgorithm, byte[] columnEncryptionKey); } }