예제 #1
0
 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));
 }
예제 #2
0
 public ColumnEncryptionKey(string name, ColumnMasterKey columnMasterKey, SqlColumnEncryptionKeyStoreProvider columnEncryptionProvider) : base(name)
 {
     ColumnMasterKey = columnMasterKey;
     byte[] plainTextColumnEncryptionKey = GenerateRandomBytes(KeySizeInBytes);
     EncryptedValue = CreateEncryptedCek(columnMasterKey.KeyPath, Algorithm, plainTextColumnEncryptionKey, columnEncryptionProvider);
 }