我有数据库,因此我使用TDE认证作为下面的代码对其进行加密
USE master;
GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyPassword';
go
CREATE CERTIFICATE DBForCompanyEncrypt WITH SUBJECT = 'Certificate subject';
go
USE DBForCompany1;
GO
CREATE DATABASE ENCRYPTION KEY
WITH ALGORITHM = AES_128
ENCRYPTION BY SERVER CERTIFICATE DBForCompanyEncrypt;
GO
ALTER DATABASE DBForCompany1
SET ENCRYPTION on;
GO
我使用下面的代码备份了主密钥和认证
BACKUP CERTIFICATE DBForCompanyEncrypt TO FILE ='F:\certification'
WITH PRIVATE KEY
(
FILE ='F:\PrivateKey',
ENCRYPTION BY PASSWORD ='MyPassword'
)
,我放弃了认证,因此无法附加数据库,因此 如何仅向我的C#Windows应用程序提供认证?