CryptographyClient Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CryptographyClient() |
Initializes a new instance of the CryptographyClient class for mocking. |
CryptographyClient(JsonWebKey) |
Initializes a new instance of the CryptographyClient class. Cryptographic operations will be performed only on the local machine. |
CryptographyClient(JsonWebKey, LocalCryptographyClientOptions) |
Initializes a new instance of the CryptographyClient class. Cryptographic operations will be performed only on the local machine. |
CryptographyClient(Uri, TokenCredential) |
Initializes a new instance of the CryptographyClient class. |
CryptographyClient(Uri, TokenCredential, CryptographyClientOptions) |
Initializes a new instance of the CryptographyClient class. |
CryptographyClient()
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Initializes a new instance of the CryptographyClient class for mocking.
protected CryptographyClient ();
Protected Sub New ()
Applies to
CryptographyClient(JsonWebKey)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Initializes a new instance of the CryptographyClient class. Cryptographic operations will be performed only on the local machine.
public CryptographyClient (Azure.Security.KeyVault.Keys.JsonWebKey key);
new Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient : Azure.Security.KeyVault.Keys.JsonWebKey -> Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient
Public Sub New (key As JsonWebKey)
Parameters
- key
- JsonWebKey
A JsonWebKey used for local cryptographic operations.
Exceptions
key
is null.
The KeyType of key
is not supported.
Applies to
CryptographyClient(JsonWebKey, LocalCryptographyClientOptions)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Initializes a new instance of the CryptographyClient class. Cryptographic operations will be performed only on the local machine.
public CryptographyClient (Azure.Security.KeyVault.Keys.JsonWebKey key, Azure.Security.KeyVault.Keys.Cryptography.LocalCryptographyClientOptions options);
new Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient : Azure.Security.KeyVault.Keys.JsonWebKey * Azure.Security.KeyVault.Keys.Cryptography.LocalCryptographyClientOptions -> Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient
Public Sub New (key As JsonWebKey, options As LocalCryptographyClientOptions)
Parameters
- key
- JsonWebKey
A JsonWebKey used for local cryptographic operations.
- options
- LocalCryptographyClientOptions
LocalCryptographyClientOptions to configure the CryptographyClient for local-only operations.
Exceptions
key
is null.
The KeyType of key
is not supported.
Applies to
CryptographyClient(Uri, TokenCredential)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Initializes a new instance of the CryptographyClient class.
public CryptographyClient (Uri keyId, Azure.Core.TokenCredential credential);
new Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient : Uri * Azure.Core.TokenCredential -> Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient
Public Sub New (keyId As Uri, credential As TokenCredential)
Parameters
- keyId
- Uri
The key identifier of the KeyVaultKey which will be used for cryptographic operations. If you have a key Uri, use KeyVaultKeyIdentifier to parse the VaultUri and other information. You should validate that this URI references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.
- credential
- TokenCredential
A TokenCredential used to authenticate requests to the vault, like DefaultAzureCredential.
Exceptions
keyId
or credential
is null.
Applies to
CryptographyClient(Uri, TokenCredential, CryptographyClientOptions)
- Source:
- CryptographyClient.cs
- Source:
- CryptographyClient.cs
Initializes a new instance of the CryptographyClient class.
public CryptographyClient (Uri keyId, Azure.Core.TokenCredential credential, Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions options);
new Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient : Uri * Azure.Core.TokenCredential * Azure.Security.KeyVault.Keys.Cryptography.CryptographyClientOptions -> Azure.Security.KeyVault.Keys.Cryptography.CryptographyClient
Public Sub New (keyId As Uri, credential As TokenCredential, options As CryptographyClientOptions)
Parameters
- keyId
- Uri
The key identifier of the KeyVaultKey which will be used for cryptographic operations. If you have a key Uri, use KeyVaultKeyIdentifier to parse the VaultUri and other information. You should validate that this URI references a valid Key Vault or Managed HSM resource. See https://aka.ms/azsdk/blog/vault-uri for details.
- credential
- TokenCredential
A TokenCredential used to authenticate requests to the vault, like DefaultAzureCredential.
- options
- CryptographyClientOptions
CryptographyClientOptions the CryptographyClient for local or remote operations on Key Vault.
Exceptions
keyId
or credential
is null.
The Version is not supported.