Freigeben über


Certificate.AddPrivateKey-Methode (String, String, String)

Adds a private key to the certificate with the specified decryption and encryption passwords.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Sub AddPrivateKey ( _
    privateKeyPath As String, _
    decryptionPassword As String, _
    encryptionPassword As String _
)
'Usage
Dim instance As Certificate 
Dim privateKeyPath As String 
Dim decryptionPassword As String 
Dim encryptionPassword As String

instance.AddPrivateKey(privateKeyPath, _
    decryptionPassword, encryptionPassword)
public void AddPrivateKey(
    string privateKeyPath,
    string decryptionPassword,
    string encryptionPassword
)
public:
void AddPrivateKey(
    String^ privateKeyPath, 
    String^ decryptionPassword, 
    String^ encryptionPassword
)
member AddPrivateKey : 
        privateKeyPath:string * 
        decryptionPassword:string * 
        encryptionPassword:string -> unit
public function AddPrivateKey(
    privateKeyPath : String, 
    decryptionPassword : String, 
    encryptionPassword : String
)

Parameter

  • privateKeyPath
    Typ: System.String
    A String value that specifies the system path to the private key file.
  • decryptionPassword
    Typ: System.String
    A String value that specifies the decryption password for the private key.
  • encryptionPassword
    Typ: System.String
    A String value that specifies the encryption password for the private key.

Beispiele

Verwenden der Verschlüsselung

Siehe auch

Verweis

Certificate Klasse

AddPrivateKey-Überladung

Microsoft.SqlServer.Management.Smo-Namespace

Andere Ressourcen

Verschlüsselungshierarchie

CREATE CERTIFICATE (Transact-SQL)