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 Classes
    Modifier and Type
    Interface
    Description
    static 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 Type
    Method
    Description
    com.azure.security.keyvault.keys.models.KeyProperties
    Gets the key management attributes.
    byte[]
    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.JsonWebKey
    Gets 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.
    boolean
    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.
    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.
    boolean
    verify(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.arm.models.HasId

    id

    Methods inherited from interface com.azure.resourcemanager.resources.fluentcore.model.HasInnerModel

    innerModel

    Methods inherited from interface com.azure.resourcemanager.resources.fluentcore.arm.models.HasName

    name

    Methods inherited from interface com.azure.resourcemanager.resources.fluentcore.model.Indexable

    key

    Methods inherited from interface com.azure.resourcemanager.resources.fluentcore.model.Updatable

    update
  • 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

      Map<String,String> 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 algorithm
      content - 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 algorithm
      content - 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 algorithm
      content - 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 algorithm
      content - 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 algorithm
      digest - 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 algorithm
      digest - 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 algorithm
      digest - the content to be signed
      signature - 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 algorithm
      digest - the content to be signed
      signature - 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 algorithm
      key - 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 algorithm
      key - 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 algorithm
      key - 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 algorithm
      key - the key to unwrap
      Returns:
      the unwrapped symmetric key