共用方式為


SymmetricKey.OpenWithCertificate 方法 (String, String)

Opens the symmetric key with a certificate.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Sub OpenWithCertificate ( _
    certificateName As String, _
    privateKeyPassword As String _
)
'用途
Dim instance As SymmetricKey 
Dim certificateName As String 
Dim privateKeyPassword As String

instance.OpenWithCertificate(certificateName, _
    privateKeyPassword)
public void OpenWithCertificate(
    string certificateName,
    string privateKeyPassword
)
public:
void OpenWithCertificate(
    String^ certificateName, 
    String^ privateKeyPassword
)
member OpenWithCertificate : 
        certificateName:string * 
        privateKeyPassword:string -> unit
public function OpenWithCertificate(
    certificateName : String, 
    privateKeyPassword : String
)

參數

  • privateKeyPassword
    型別:System.String
    A String value that specifies the password that was used to encrypt the private key of the certificate.

範例

使用加密

請參閱

參考

SymmetricKey 類別

OpenWithCertificate 多載

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

加密階層

CREATE SYMMETRIC KEY (Transact-SQL)

OPEN SYMMETRIC KEY (Transact-SQL)