Key Interface

Implements

public interface Key
extends Indexable, HasInner<KeyBundle>, HasId, HasName, Updatable<Update>

An immutable client-side representation of an Azure Key Vault key.

Method Summary

Modifier and Type Method and Description
abstract KeyAttributes attributes()
abstract byte[] backup()
abstract rx.Observable<byte[]> backupAsync()
abstract byte[] decrypt(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Decrypts a single block of encrypted data.

abstract rx.Observable<byte[]> decryptAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Decrypts a single block of encrypted data.

abstract byte[] encrypt(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.

abstract rx.Observable<byte[]> encryptAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.

abstract JsonWebKey jsonWebKey()
abstract com.microsoft.azure.PagedList<Key> listVersions()
abstract rx.Observable<Key> listVersionsAsync()
abstract boolean managed()
abstract byte[] sign(JsonWebKeySignatureAlgorithm algorithm, byte[] digest)

Creates a signature from a digest.

abstract rx.Observable<byte[]> signAsync(JsonWebKeySignatureAlgorithm algorithm, byte[] digest)

Creates a signature from a digest.

abstract java.util.Map<java.lang.String,java.lang.String> tags()
abstract byte[] unwrapKey(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Unwraps a symmetric key wrapped originally by this Key Vault key.

abstract rx.Observable<byte[]> unwrapKeyAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Unwraps a symmetric key wrapped originally by this Key Vault key.

abstract boolean verify(JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature)

Verifies a signature from a digest.

abstract rx.Observable<java.lang.Boolean> verifyAsync(JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature)

Verifies a signature from a digest.

abstract byte[] wrapKey(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Wraps a symmetric key using the specified algorithm.

abstract rx.Observable<byte[]> wrapKeyAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Wraps a symmetric key using the specified algorithm.

Method Details

attributes

public abstract KeyAttributes attributes()

Returns:

the key management attributes.

backup

public abstract byte[] backup()

Returns:

a backup of the specified key be downloaded to the client

backupAsync

public abstract Observable backupAsync()

Returns:

a backup of the specified key be downloaded to the client

decrypt

public abstract byte[] decrypt(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Decrypts a single block of encrypted data.

Parameters:

algorithm - the JWK encryption algorithm
content - the content to be decrypted

Returns:

the decrypted value

decryptAsync

public abstract Observable decryptAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Decrypts a single block of encrypted data.

Parameters:

algorithm - the JWK encryption algorithm
content - the content to be decrypted

Returns:

the decrypted value

encrypt

public abstract byte[] encrypt(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.

Parameters:

algorithm - the JWK encryption algorithm
content - the content to be encrypted

Returns:

the encrypted value

encryptAsync

public abstract Observable encryptAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] content)

Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.

Parameters:

algorithm - the JWK encryption algorithm
content - the content to be encrypted

Returns:

the encrypted value

jsonWebKey

public abstract JsonWebKey jsonWebKey()

Returns:

the Json web key.

listVersions

public abstract PagedList listVersions()

Returns:

a list of individual key versions with the same key name

listVersionsAsync

public abstract Observable listVersionsAsync()

Returns:

a list of individual key versions with the same key name

managed

public abstract boolean managed()

Returns:

true if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.

sign

public abstract byte[] sign(JsonWebKeySignatureAlgorithm algorithm, byte[] digest)

Creates a signature from a digest.

Parameters:

algorithm - the JWK signing algorithm
digest - the content to be signed

Returns:

the signature in a byte array

signAsync

public abstract Observable signAsync(JsonWebKeySignatureAlgorithm algorithm, byte[] digest)

Creates a signature from a digest.

Parameters:

algorithm - the JWK signing algorithm
digest - the content to be signed

Returns:

the signature in a byte array

tags

public abstract Map tags()

Returns:

application specific metadata in the form of key-value pairs.

unwrapKey

public abstract byte[] unwrapKey(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Unwraps a symmetric key wrapped originally by this Key Vault key.

Parameters:

algorithm - the JWK encryption algorithm
key - the key to unwrap

Returns:

the unwrapped symmetric key

unwrapKeyAsync

public abstract Observable unwrapKeyAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Unwraps a symmetric key wrapped originally by this Key Vault key.

Parameters:

algorithm - the JWK encryption algorithm
key - the key to unwrap

Returns:

the unwrapped symmetric key

verify

public abstract boolean verify(JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature)

Verifies a signature from a digest.

Parameters:

algorithm - the JWK signing algorithm
digest - the content to be signed
signature - the signature to verify

Returns:

true if the signature is valid

verifyAsync

public abstract Observable verifyAsync(JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature)

Verifies a signature from a digest.

Parameters:

algorithm - the JWK signing algorithm
digest - the content to be signed
signature - the signature to verify

Returns:

true if the signature is valid

wrapKey

public abstract byte[] wrapKey(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Wraps a symmetric key using the specified algorithm.

Parameters:

algorithm - the JWK encryption algorithm
key - the symmetric key to wrap

Returns:

the wrapped key

wrapKeyAsync

public abstract Observable wrapKeyAsync(JsonWebKeyEncryptionAlgorithm algorithm, byte[] key)

Wraps a symmetric key using the specified algorithm.

Parameters:

algorithm - the JWK encryption algorithm
key - the symmetric key to wrap

Returns:

the wrapped key

Applies to