Share via


MasterKey.AddPasswordEncryption Method

Adds password encryption to the master key.

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

Syntax

'Declaration
Public Sub AddPasswordEncryption ( _
    password As String _
)
'Usage
Dim instance As MasterKey 
Dim password As String

instance.AddPasswordEncryption(password)
public void AddPasswordEncryption(
    string password
)
public:
void AddPasswordEncryption(
    String^ password
)
member AddPasswordEncryption : 
        password:string -> unit
public function AddPasswordEncryption(
    password : String
)

Parameters

  • password
    Type: System.String
    A String value that specifies the password with which to encrypt and decrypt the master key.

Remarks

The IsEncryptedByServer property specifies whether the master key is encrypted by the service master key or by using a password.

Examples

Calling Methods

See Also

Reference

MasterKey Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Encryption Hierarchy

CREATE MASTER KEY (Transact-SQL)