KeyVaultKey Class
- java.
lang. Object - Closeable
- IKey
- com.
microsoft. azure. keyvault. extensions. KeyVaultKey
- com.
public class KeyVaultKey implements IKey
The key vault key that performs cryptography operations.
Constructor Summary
Constructor | Description | |
---|---|---|
KeyVaultKey(KeyVaultClient client, KeyBundle keyBundle) |
Method Summary
Modifier and Type | Method and Description |
---|---|
void | close() |
ListenableFuture<byte[]> |
decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm)
Decrypts the specified cipher text. Note that not all algorithms require, or support, all parameters. |
ListenableFuture<Triple<byte[], byte[], String>> |
encryptAsync(byte[] plaintext, byte[] iv, byte[] authenticationData, String algorithm)
Encrypts the specified plain text. Note that not all algorithms require, or support, all parameters. |
String |
getDefaultEncryptionAlgorithm()
The default encryption algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513. |
String |
getDefaultKeyWrapAlgorithm()
The default key wrap algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513. |
String |
getDefaultSignatureAlgorithm()
The default signature algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513. |
String |
getKid()
The unique key identifier for this key. |
ListenableFuture<Pair<byte[], String>> |
signAsync(byte[] digest, String algorithm)
Signs the specified digest using the specified algorithm, or the keys DefaultSignatureAlgorithm if no algorithm is specified. |
ListenableFuture<byte[]> |
unwrapKeyAsync(byte[] ciphertext, String algorithm)
Unwraps (decrypts) the specified encryped key material. |
ListenableFuture<Boolean> |
verifyAsync(byte[] digest, byte[] signature, String algorithm)
Verifies the supplied signature value using the supplied digest and algorithm. |
ListenableFuture<Pair<byte[], String>> |
wrapKeyAsync(byte[] plaintext, String algorithm)
Wraps (encrypts) the specified symmetric key material using the specified algorithm, or the keys DefaultKeyWrapAlgorithm if none is specified. |
Constructor Details
KeyVaultKey
protected KeyVaultKey(KeyVaultClient client, KeyBundle keyBundle)
Parameters:
Method Details
close
public void close()
decryptAsync
public ListenableFuture
Decrypts the specified cipher text. Note that not all algorithms require, or support, all parameters.
Overrides:
KeyVaultKey.decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm)Parameters:
Returns:
Throws:
encryptAsync
public ListenableFuture
Encrypts the specified plain text. Note that not all algorithms require, or support, all parameters.
Overrides:
KeyVaultKey.encryptAsync(byte[] plaintext, byte[] iv, byte[] authenticationData, String algorithm)Parameters:
Returns:
Throws:
getDefaultEncryptionAlgorithm
public String getDefaultEncryptionAlgorithm()
The default encryption algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513.
Overrides:
KeyVaultKey.getDefaultEncryptionAlgorithm()Returns:
getDefaultKeyWrapAlgorithm
public String getDefaultKeyWrapAlgorithm()
The default key wrap algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513.
Overrides:
KeyVaultKey.getDefaultKeyWrapAlgorithm()Returns:
getDefaultSignatureAlgorithm
public String getDefaultSignatureAlgorithm()
The default signature algorithm for this key, using the representations from Json Web Key Algorithms, RFC7513.
Overrides:
KeyVaultKey.getDefaultSignatureAlgorithm()Returns:
getKid
public String getKid()
The unique key identifier for this key.
Overrides:
KeyVaultKey.getKid()Returns:
signAsync
public ListenableFuture
Signs the specified digest using the specified algorithm, or the keys DefaultSignatureAlgorithm if no algorithm is specified.
Overrides:
KeyVaultKey.signAsync(byte[] digest, String algorithm)Parameters:
Returns:
Throws:
unwrapKeyAsync
public ListenableFuture
Unwraps (decrypts) the specified encryped key material.
Overrides:
KeyVaultKey.unwrapKeyAsync(byte[] ciphertext, String algorithm)Parameters:
Returns:
Throws:
verifyAsync
public ListenableFuture
Verifies the supplied signature value using the supplied digest and algorithm.
Overrides:
KeyVaultKey.verifyAsync(byte[] digest, byte[] signature, String algorithm)Parameters:
Returns:
Throws:
wrapKeyAsync
public ListenableFuture
Wraps (encrypts) the specified symmetric key material using the specified algorithm, or the keys DefaultKeyWrapAlgorithm if none is specified.
Overrides:
KeyVaultKey.wrapKeyAsync(byte[] plaintext, String algorithm)Parameters:
Returns:
Throws:
Applies to
Azure SDK for Java