public override int GetHashCode()
 {
     return
         ((CertificateCommonName?.GetHashCode() ?? 0) ^
          (CertificateStoreName?.GetHashCode() ?? 0) ^
          (CertificateStoreLocation?.GetHashCode() ?? 0) ^
          base.GetHashCode());
 }
Example #2
0
        public CspColumnMasterKey(string name, string certificateThumbprint, SqlColumnEncryptionKeyStoreProvider certStoreProvider, bool allowEnclaveComputations) : base(name)
        {
            KeyStoreProviderName = @"MSSQL_CERTIFICATE_STORE";
            Thumbprint           = certificateThumbprint;
            KeyPath = string.Concat(CertificateStoreLocation.ToString(), "/", CertificateStoreName.ToString(), "/", Thumbprint);

            byte[] cmkSign = certStoreProvider.SignColumnMasterKeyMetadata(KeyPath, allowEnclaveComputations);
            CmkSignStr = string.Concat("0x", BitConverter.ToString(cmkSign).Replace("-", string.Empty));
        }
 public CspProviderColumnMasterKey(string name, string certificateThumbprint) : base(name)
 {
     KeyStoreProviderName = @"MSSQL_CERTIFICATE_STORE";
     Thumbprint           = certificateThumbprint;
     KeyPath = string.Concat(CertificateStoreLocation.ToString(), "/", CertificateStoreName.ToString(), "/", Thumbprint);
 }