Interface Key
- All Superinterfaces:
HasId,HasInnerModel<com.azure.security.keyvault.keys.models.KeyProperties>,HasName,Indexable,Updatable<Key.Update>
public interface Key
extends Indexable, HasInnerModel<com.azure.security.keyvault.keys.models.KeyProperties>, HasId, HasName, Updatable<Key.Update>
An immutable client-side representation of an Azure Key Vault key.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceContainer interface for all the definitions.static interfaceGrouping of key definition stages.static interfaceThe template for a key update operation, containing all the settings that can be modified.static interfaceGrouping of key update stages.static interfaceThe template for a key vault update operation, with a new key version to be created.static interfaceThe template for a key vault update operation, with a new key version to be imported. -
Method Summary
Modifier and TypeMethodDescriptioncom.azure.security.keyvault.keys.models.KeyPropertiesbyte[]backup()Mono<byte[]>byte[]decrypt(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm algorithm, byte[] content) Decrypts a single block of encrypted data.Mono<byte[]>decryptAsync(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm algorithm, byte[] content) Decrypts a single block of encrypted data.byte[]encrypt(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm algorithm, byte[] content) Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.Mono<byte[]>encryptAsync(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm algorithm, byte[] content) Encrypts an arbitrary sequence of bytes using an encryption key that is stored in a key vault.com.azure.security.keyvault.keys.models.JsonWebKeyMono<com.azure.security.keyvault.keys.models.JsonWebKey>com.azure.core.http.rest.PagedIterable<Key>com.azure.core.http.rest.PagedFlux<Key>booleanmanaged()byte[]sign(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, byte[] digest) Creates a signature from a digest.Mono<byte[]>signAsync(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, byte[] digest) Creates a signature from a digest.tags()byte[]unwrapKey(com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm algorithm, byte[] key) Unwraps a symmetric key wrapped originally by this Key Vault key.Mono<byte[]>unwrapKeyAsync(com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm algorithm, byte[] key) Unwraps a symmetric key wrapped originally by this Key Vault key.booleanverify(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, byte[] digest, byte[] signature) Verifies a signature from a digest.verifyAsync(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, byte[] digest, byte[] signature) Verifies a signature from a digest.byte[]wrapKey(com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm algorithm, byte[] key) Wraps a symmetric key using the specified algorithm.Mono<byte[]>wrapKeyAsync(com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm algorithm, byte[] key) Wraps a symmetric key using the specified algorithm.Methods inherited from interface com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel
innerModel
-
Method Details
-
getJsonWebKey
com.azure.security.keyvault.keys.models.JsonWebKey getJsonWebKey()- Returns:
- the Json web key.
-
getJsonWebKeyAsync
Mono<com.azure.security.keyvault.keys.models.JsonWebKey> getJsonWebKeyAsync()- Returns:
- the Json web key.
-
attributes
com.azure.security.keyvault.keys.models.KeyProperties 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.azure.core.http.rest.PagedIterable<Key> listVersions()- Returns:
- a list of individual key versions with the same key name
-
listVersionsAsync
com.azure.core.http.rest.PagedFlux<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
Mono<byte[]> backupAsync()- Returns:
- a backup of the specified key be downloaded to the client
-
encrypt
byte[] encrypt(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm 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
Mono<byte[]> encryptAsync(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm 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.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm 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
Mono<byte[]> decryptAsync(com.azure.security.keyvault.keys.cryptography.models.EncryptionAlgorithm 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.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm 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
Mono<byte[]> signAsync(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm 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.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm 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
Mono<Boolean> verifyAsync(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm 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.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm 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
Mono<byte[]> wrapKeyAsync(com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm 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.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm 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
Mono<byte[]> unwrapKeyAsync(com.azure.security.keyvault.keys.cryptography.models.KeyWrapAlgorithm 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
-