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.KeyPropertiesGets the key management attributes.byte[]backup()GEts a backup of the specified key be downloaded to the client.Mono<byte[]> Gets a backup of the specified key be downloaded to the client.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.JsonWebKeyGets the Json web key.Mono<com.azure.security.keyvault.keys.models.JsonWebKey> Gets the Json web key.com.azure.core.http.rest.PagedIterable<Key> Gets a list of individual key versions with the same key name.com.azure.core.http.rest.PagedFlux<Key> Gets a list of individual key versions with the same key name.booleanmanaged()Checks whether the key's lifetime is managed by key vault.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()Gets application specific metadata in the form of key-value pairs.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()Gets the Json web key.- Returns:
- the Json web key.
-
getJsonWebKeyAsync
Mono<com.azure.security.keyvault.keys.models.JsonWebKey> getJsonWebKeyAsync()Gets the Json web key.- Returns:
- the Json web key.
-
attributes
com.azure.security.keyvault.keys.models.KeyProperties attributes()Gets the key management attributes.- Returns:
- the key management attributes.
-
tags
Gets application specific metadata in the form of key-value pairs.- Returns:
- application specific metadata in the form of key-value pairs.
-
managed
boolean managed()Checks whether the key's lifetime is managed by key vault.- 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()Gets a list of individual key versions with the same key name.- Returns:
- a list of individual key versions with the same key name
-
listVersionsAsync
com.azure.core.http.rest.PagedFlux<Key> listVersionsAsync()Gets a list of individual key versions with the same key name.- Returns:
- a list of individual key versions with the same key name
-
backup
byte[] backup()GEts a backup of the specified key be downloaded to the client.- Returns:
- a backup of the specified key be downloaded to the client
-
backupAsync
Mono<byte[]> backupAsync()Gets a backup of the specified key be downloaded to the client.- 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
-