Interface Key
- All Superinterfaces:
HasId
,HasInner<com.microsoft.azure.keyvault.models.KeyBundle>
,HasName
,Indexable
,Updatable<Key.Update>
@Beta(V1_6_0)
public interface Key
extends Indexable, HasInner<com.microsoft.azure.keyvault.models.KeyBundle>, HasId, HasName, Updatable<Key.Update>
An immutable client-side representation of an Azure Key Vault key.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Container interface for all the definitions.static interface
Grouping of key definition stages.static interface
The template for a key update operation, containing all the settings that can be modified.static interface
Grouping of key update stages.static interface
The template for a key vault update operation, with a new key version to be created.static interface
The template for a key vault update operation, with a new key version to be imported. -
Method Summary
Modifier and TypeMethodDescriptioncom.microsoft.azure.keyvault.models.KeyAttributes
byte[]
backup()
rx.Observable<byte[]>
byte[]
decrypt
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] content) Decrypts a single block of encrypted data.rx.Observable<byte[]>
decryptAsync
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] content) Decrypts a single block of encrypted data.byte[]
encrypt
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] content) Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.rx.Observable<byte[]>
encryptAsync
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] content) Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.com.microsoft.azure.keyvault.webkey.JsonWebKey
com.microsoft.azure.PagedList<Key>
rx.Observable<Key>
boolean
managed()
byte[]
sign
(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest) Creates a signature from a digest.rx.Observable<byte[]>
signAsync
(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest) Creates a signature from a digest.tags()
byte[]
unwrapKey
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Unwraps a symmetric key wrapped originally by this Key Vault key.rx.Observable<byte[]>
unwrapKeyAsync
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Unwraps a symmetric key wrapped originally by this Key Vault key.boolean
verify
(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature) Verifies a signature from a digest.rx.Observable<Boolean>
verifyAsync
(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature) Verifies a signature from a digest.byte[]
wrapKey
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Wraps a symmetric key using the specified algorithm.rx.Observable<byte[]>
wrapKeyAsync
(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Wraps a symmetric key using the specified algorithm.Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasId
id
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.model.HasInner
inner
Methods inherited from interface com.microsoft.azure.management.resources.fluentcore.arm.models.HasName
name
-
Method Details
-
jsonWebKey
com.microsoft.azure.keyvault.webkey.JsonWebKey jsonWebKey()- Returns:
- the Json web key.
-
attributes
com.microsoft.azure.keyvault.models.KeyAttributes attributes()- Returns:
- the key management attributes.
-
tags
- Returns:
- application specific metadata in the form of key-value pairs.
-
managed
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.
-
listVersions
com.microsoft.azure.PagedList<Key> listVersions()- Returns:
- a list of individual key versions with the same key name
-
listVersionsAsync
rx.Observable<Key> listVersionsAsync()- Returns:
- a list of individual key versions with the same key name
-
backup
byte[] backup()- Returns:
- a backup of the specified key be downloaded to the client
-
backupAsync
rx.Observable<byte[]> backupAsync()- Returns:
- a backup of the specified key be downloaded to the client
-
encrypt
byte[] encrypt(com.microsoft.azure.keyvault.webkey.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 algorithmcontent
- the content to be encrypted- Returns:
- the encrypted value
-
encryptAsync
rx.Observable<byte[]> encryptAsync(com.microsoft.azure.keyvault.webkey.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 algorithmcontent
- the content to be encrypted- Returns:
- the encrypted value
-
decrypt
byte[] decrypt(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] content) Decrypts a single block of encrypted data.- Parameters:
algorithm
- the JWK encryption algorithmcontent
- the content to be decrypted- Returns:
- the decrypted value
-
decryptAsync
rx.Observable<byte[]> decryptAsync(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] content) Decrypts a single block of encrypted data.- Parameters:
algorithm
- the JWK encryption algorithmcontent
- the content to be decrypted- Returns:
- the decrypted value
-
sign
byte[] sign(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest) Creates a signature from a digest.- Parameters:
algorithm
- the JWK signing algorithmdigest
- the content to be signed- Returns:
- the signature in a byte array
-
signAsync
rx.Observable<byte[]> signAsync(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest) Creates a signature from a digest.- Parameters:
algorithm
- the JWK signing algorithmdigest
- the content to be signed- Returns:
- the signature in a byte array
-
verify
boolean verify(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature) Verifies a signature from a digest.- Parameters:
algorithm
- the JWK signing algorithmdigest
- the content to be signedsignature
- the signature to verify- Returns:
- true if the signature is valid
-
verifyAsync
rx.Observable<Boolean> verifyAsync(com.microsoft.azure.keyvault.webkey.JsonWebKeySignatureAlgorithm algorithm, byte[] digest, byte[] signature) Verifies a signature from a digest.- Parameters:
algorithm
- the JWK signing algorithmdigest
- the content to be signedsignature
- the signature to verify- Returns:
- true if the signature is valid
-
wrapKey
byte[] wrapKey(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Wraps a symmetric key using the specified algorithm.- Parameters:
algorithm
- the JWK encryption algorithmkey
- the symmetric key to wrap- Returns:
- the wrapped key
-
wrapKeyAsync
rx.Observable<byte[]> wrapKeyAsync(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Wraps a symmetric key using the specified algorithm.- Parameters:
algorithm
- the JWK encryption algorithmkey
- the symmetric key to wrap- Returns:
- the wrapped key
-
unwrapKey
byte[] unwrapKey(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Unwraps a symmetric key wrapped originally by this Key Vault key.- Parameters:
algorithm
- the JWK encryption algorithmkey
- the key to unwrap- Returns:
- the unwrapped symmetric key
-
unwrapKeyAsync
rx.Observable<byte[]> unwrapKeyAsync(com.microsoft.azure.keyvault.webkey.JsonWebKeyEncryptionAlgorithm algorithm, byte[] key) Unwraps a symmetric key wrapped originally by this Key Vault key.- Parameters:
algorithm
- the JWK encryption algorithmkey
- the key to unwrap- Returns:
- the unwrapped symmetric key
-