Class KeyVaultKey
- java.lang.Object
-
- com.microsoft.azure.keyvault.extensions.KeyVaultKey
-
- All Implemented Interfaces:
IKey
,Closeable
,AutoCloseable
public class KeyVaultKey extends Object implements IKey
The key vault key that performs cryptography operations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
KeyVaultKey(KeyVaultClient client, KeyBundle keyBundle)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
com.google.common.util.concurrent.ListenableFuture<byte[]>
decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm)
com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Triple<byte[],byte[],String>>
encryptAsync(byte[] plaintext, byte[] iv, byte[] authenticationData, String algorithm)
String
getDefaultEncryptionAlgorithm()
String
getDefaultKeyWrapAlgorithm()
String
getDefaultSignatureAlgorithm()
String
getKid()
com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Pair<byte[],String>>
signAsync(byte[] digest, String algorithm)
com.google.common.util.concurrent.ListenableFuture<byte[]>
unwrapKeyAsync(byte[] ciphertext, String algorithm)
com.google.common.util.concurrent.ListenableFuture<Boolean>
verifyAsync(byte[] digest, byte[] signature, String algorithm)
com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Pair<byte[],String>>
wrapKeyAsync(byte[] plaintext, String algorithm)
-
-
-
Constructor Detail
-
KeyVaultKey
protected KeyVaultKey(KeyVaultClient client, KeyBundle keyBundle)
-
-
Method Detail
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
getDefaultEncryptionAlgorithm
public String getDefaultEncryptionAlgorithm()
- Specified by:
getDefaultEncryptionAlgorithm
in interfaceIKey
-
getDefaultKeyWrapAlgorithm
public String getDefaultKeyWrapAlgorithm()
- Specified by:
getDefaultKeyWrapAlgorithm
in interfaceIKey
-
getDefaultSignatureAlgorithm
public String getDefaultSignatureAlgorithm()
- Specified by:
getDefaultSignatureAlgorithm
in interfaceIKey
-
decryptAsync
public com.google.common.util.concurrent.ListenableFuture<byte[]> decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm)
- Specified by:
decryptAsync
in interfaceIKey
-
encryptAsync
public com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Triple<byte[],byte[],String>> encryptAsync(byte[] plaintext, byte[] iv, byte[] authenticationData, String algorithm) throws NoSuchAlgorithmException
- Specified by:
encryptAsync
in interfaceIKey
- Throws:
NoSuchAlgorithmException
-
wrapKeyAsync
public com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Pair<byte[],String>> wrapKeyAsync(byte[] plaintext, String algorithm) throws NoSuchAlgorithmException
- Specified by:
wrapKeyAsync
in interfaceIKey
- Throws:
NoSuchAlgorithmException
-
unwrapKeyAsync
public com.google.common.util.concurrent.ListenableFuture<byte[]> unwrapKeyAsync(byte[] ciphertext, String algorithm)
- Specified by:
unwrapKeyAsync
in interfaceIKey
-
signAsync
public com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Pair<byte[],String>> signAsync(byte[] digest, String algorithm) throws NoSuchAlgorithmException
- Specified by:
signAsync
in interfaceIKey
- Throws:
NoSuchAlgorithmException
-
verifyAsync
public com.google.common.util.concurrent.ListenableFuture<Boolean> verifyAsync(byte[] digest, byte[] signature, String algorithm) throws NoSuchAlgorithmException
- Specified by:
verifyAsync
in interfaceIKey
- Throws:
NoSuchAlgorithmException
-
-