SymmetricKey.Create SymmetricKey.Create SymmetricKey.Create Method

Definition

Creates a symmetric key on the database with the specified encryption type and method.

Overloads

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String, String)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString, String)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption, String, String, CreateDispositionType) Create(SymmetricKeyEncryption, String, String, CreateDispositionType)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString, String)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String, String)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm)

Creates a symmetric key on the database with the specified encryption type and method.

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString)

Creates a symmetric key on the database with the specified encryption type and method.

Examples

Using Encryption

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String, String)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(cli::array <Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^> ^ keyEncryptions, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::String ^ passPhrase, System::String ^ identityPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption[] keyEncryptions, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, string passPhrase, string identityPhrase);
Public Sub Create (keyEncryptions As SymmetricKeyEncryption(), keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As String, identityPhrase As String)
Parameters
keyEncryptions
SymmetricKeyEncryption[]

A SymmetricKeyEncryption object array value that specifies more than one encryption type.

passPhrase
String String String

A String value that specifies the pass phrase from which the symmetric key can be derived.

identityPhrase
String String String

A String value that specifies the identity phrase used to tag data that is encrypted with the key. Either passPhrase or identityPhrase can be null, but at least one needs to be set.

Examples

Using Encryption

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString, String)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(cli::array <Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^> ^ keyEncryptions, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::Security::SecureString ^ passPhrase, System::String ^ identityPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption[] keyEncryptions, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System.Security.SecureString passPhrase, string identityPhrase);
Public Sub Create (keyEncryptions As SymmetricKeyEncryption(), keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As SecureString, identityPhrase As String)
Parameters
keyEncryptions
SymmetricKeyEncryption[]

A SymmetricKeyEncryption object array value that specifies more than one encryption type.

passPhrase
SecureString SecureString SecureString

A SecureString value that specifies the pass phrase from which the symmetric key can be derived.

identityPhrase
String String String

A String value that specifies the identity phrase used to tag data that is encrypted with the key. Either passPhrase or identityPhrase can be null, but at least one needs to be set.

Examples

Using Encryption

Create(SymmetricKeyEncryption, String, String, CreateDispositionType) Create(SymmetricKeyEncryption, String, String, CreateDispositionType)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^ keyEncryption, System::String ^ providerAlgorithm, System::String ^ providerKeyName, Microsoft::SqlServer::Management::Smo::CreateDispositionType createDispositionType);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption keyEncryption, string providerAlgorithm, string providerKeyName, Microsoft.SqlServer.Management.Smo.CreateDispositionType createDispositionType);
Parameters
keyEncryption
SymmetricKeyEncryption SymmetricKeyEncryption SymmetricKeyEncryption

A SymmetricKeyEncryption object value that specifies the encryption type.

providerAlgorithm
String String String

A String value that identifies the name of the Provider Algorithm.

providerKeyName
String String String

A String value that identifies the name of the key as designated by the provider

createDispositionType
CreateDispositionType CreateDispositionType CreateDispositionType

The CreateDispositionType object specifies an existing or a new Extensible Key Management key.

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString, String)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^ keyEncryption, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::Security::SecureString ^ passPhrase, System::String ^ identityPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption keyEncryption, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System.Security.SecureString passPhrase, string identityPhrase);
Public Sub Create (keyEncryption As SymmetricKeyEncryption, keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As SecureString, identityPhrase As String)
Parameters
keyEncryption
SymmetricKeyEncryption SymmetricKeyEncryption SymmetricKeyEncryption

A SymmetricKeyEncryption object value that specifies the encryption type.

passPhrase
SecureString SecureString SecureString

A SecureString value that specifies the pass phrase from which the symmetric key can be derived.

identityPhrase
String String String

A String value that specifies the identity phrase used to tag data that is encrypted with the key. Either passPhrase or identityPhrase can be null, but at least one needs to be set.

Examples

Using Encryption

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, String)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(cli::array <Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^> ^ keyEncryptions, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::String ^ passPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption[] keyEncryptions, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, string passPhrase);
Public Sub Create (keyEncryptions As SymmetricKeyEncryption(), keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As String)
Parameters
keyEncryptions
SymmetricKeyEncryption[]

A SymmetricKeyEncryption object array value that specifies more than one encryption type.

passPhrase
String String String

A String value that specifies the pass phrase from which the symmetric key can be derived.

Examples

Using Encryption

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String, String)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^ keyEncryption, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::String ^ passPhrase, System::String ^ identityPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption keyEncryption, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, string passPhrase, string identityPhrase);
Public Sub Create (keyEncryption As SymmetricKeyEncryption, keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As String, identityPhrase As String)
Parameters
keyEncryption
SymmetricKeyEncryption SymmetricKeyEncryption SymmetricKeyEncryption

A SymmetricKeyEncryption object value that specifies the encryption type.

passPhrase
String String String

A String value that specifies the pass phrase from which the symmetric key can be derived.

identityPhrase
String String String

A String value that specifies the identity phrase used to tag data that is encrypted with the key. Either passPhrase or identityPhrase can be null, but at least one needs to be set.

Examples

Using Encryption

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, String)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^ keyEncryption, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::String ^ passPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption keyEncryption, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, string passPhrase);
Public Sub Create (keyEncryption As SymmetricKeyEncryption, keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As String)
Parameters
keyEncryption
SymmetricKeyEncryption SymmetricKeyEncryption SymmetricKeyEncryption

A SymmetricKeyEncryption object value that specifies the encryption type.

passPhrase
String String String

A String value that specifies the pass phrase from which the symmetric key can be derived.

Examples

Using Encryption

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm, SecureString)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^ keyEncryption, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::Security::SecureString ^ passPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption keyEncryption, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System.Security.SecureString passPhrase);
Public Sub Create (keyEncryption As SymmetricKeyEncryption, keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As SecureString)
Parameters
keyEncryption
SymmetricKeyEncryption SymmetricKeyEncryption SymmetricKeyEncryption

A SymmetricKeyEncryption object value that specifies the encryption type.

passPhrase
SecureString SecureString SecureString

A SecureString value that specifies the pass phrase from which the symmetric key can be derived.

Examples

Using Encryption

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(cli::array <Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^> ^ keyEncryptions, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption[] keyEncryptions, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm);
Public Sub Create (keyEncryptions As SymmetricKeyEncryption(), keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm)
Parameters
keyEncryptions
SymmetricKeyEncryption[]

A SymmetricKeyEncryption object array value that specifies more than one encryption type.

Examples

Using Encryption

Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm) Create(SymmetricKeyEncryption, SymmetricKeyEncryptionAlgorithm)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^ keyEncryption, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption keyEncryption, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm);
Public Sub Create (keyEncryption As SymmetricKeyEncryption, keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm)
Parameters
keyEncryption
SymmetricKeyEncryption SymmetricKeyEncryption SymmetricKeyEncryption

A SymmetricKeyEncryption object value that specifies the encryption type.

Examples

Using Encryption

Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString) Create(SymmetricKeyEncryption[], SymmetricKeyEncryptionAlgorithm, SecureString)

Creates a symmetric key on the database with the specified encryption type and method.

public:
 void Create(cli::array <Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryption ^> ^ keyEncryptions, Microsoft::SqlServer::Management::Smo::SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System::Security::SecureString ^ passPhrase);
public void Create (Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryption[] keyEncryptions, Microsoft.SqlServer.Management.Smo.SymmetricKeyEncryptionAlgorithm keyEncryptionAlgorithm, System.Security.SecureString passPhrase);
Public Sub Create (keyEncryptions As SymmetricKeyEncryption(), keyEncryptionAlgorithm As SymmetricKeyEncryptionAlgorithm, passPhrase As SecureString)
Parameters
keyEncryptions
SymmetricKeyEncryption[]

A SymmetricKeyEncryption object array value that specifies more than one encryption type.

passPhrase
SecureString SecureString SecureString

A SecureString value that specifies the pass phrase from which the symmetric key can be derived.

Examples

Using Encryption

Applies to