public ColumnEncryptionKey(string name, ColumnMasterKey columnMasterKey, SqlColumnEncryptionKeyStoreProvider columnEncryptionProvider) : base(name) { ColumnMasterKey = columnMasterKey; byte[] plainTextColumnEncryptionKey = GenerateRandomBytes(KeySizeInBytes); byte[] encryptedColumnEncryptionKey = CreateEncryptedCek(columnMasterKey.KeyPath, Algorithm, plainTextColumnEncryptionKey, columnEncryptionProvider); EncryptedValue = string.Concat("0x", BitConverter.ToString(encryptedColumnEncryptionKey).Replace("-", string.Empty)); }
public ColumnEncryptionKey(string name, ColumnMasterKey columnMasterKey, SqlColumnEncryptionKeyStoreProvider columnEncryptionProvider) : base(name) { ColumnMasterKey = columnMasterKey; byte[] plainTextColumnEncryptionKey = GenerateRandomBytes(KeySizeInBytes); EncryptedValue = CreateEncryptedCek(columnMasterKey.KeyPath, Algorithm, plainTextColumnEncryptionKey, columnEncryptionProvider); }