public class RsaKey extends Object implements com.microsoft.azure.keyvault.core.IKey
Modifier and Type | Field and Description |
---|---|
static int |
KeySize1024 |
static int |
KeySize2048 |
Constructor and Description |
---|
RsaKey(String kid) |
RsaKey(String kid,
int keySize) |
RsaKey(String kid,
int keySize,
Provider provider) |
RsaKey(String kid,
KeyPair keyPair) |
RsaKey(String kid,
KeyPair keyPair,
Provider provider) |
Modifier and Type | Method and 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() |
static int |
getDefaultKeySize() |
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[] encryptedKey,
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[] key,
String algorithm) |
public RsaKey(String kid) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public RsaKey(String kid, int keySize) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public RsaKey(String kid, int keySize, Provider provider) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static int getDefaultKeySize()
public String getDefaultEncryptionAlgorithm()
getDefaultEncryptionAlgorithm
in interface com.microsoft.azure.keyvault.core.IKey
public String getDefaultKeyWrapAlgorithm()
getDefaultKeyWrapAlgorithm
in interface com.microsoft.azure.keyvault.core.IKey
public String getDefaultSignatureAlgorithm()
getDefaultSignatureAlgorithm
in interface com.microsoft.azure.keyvault.core.IKey
public String getKid()
getKid
in interface com.microsoft.azure.keyvault.core.IKey
public com.google.common.util.concurrent.ListenableFuture<byte[]> decryptAsync(byte[] ciphertext, byte[] iv, byte[] authenticationData, byte[] authenticationTag, String algorithm) throws NoSuchAlgorithmException
decryptAsync
in interface com.microsoft.azure.keyvault.core.IKey
NoSuchAlgorithmException
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
encryptAsync
in interface com.microsoft.azure.keyvault.core.IKey
NoSuchAlgorithmException
public com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Pair<byte[],String>> wrapKeyAsync(byte[] key, String algorithm) throws NoSuchAlgorithmException
wrapKeyAsync
in interface com.microsoft.azure.keyvault.core.IKey
NoSuchAlgorithmException
public com.google.common.util.concurrent.ListenableFuture<byte[]> unwrapKeyAsync(byte[] encryptedKey, String algorithm) throws NoSuchAlgorithmException
unwrapKeyAsync
in interface com.microsoft.azure.keyvault.core.IKey
NoSuchAlgorithmException
public com.google.common.util.concurrent.ListenableFuture<org.apache.commons.lang3.tuple.Pair<byte[],String>> signAsync(byte[] digest, String algorithm) throws NoSuchAlgorithmException
signAsync
in interface com.microsoft.azure.keyvault.core.IKey
NoSuchAlgorithmException
public com.google.common.util.concurrent.ListenableFuture<Boolean> verifyAsync(byte[] digest, byte[] signature, String algorithm) throws NoSuchAlgorithmException
verifyAsync
in interface com.microsoft.azure.keyvault.core.IKey
NoSuchAlgorithmException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/