Interface Key

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static interface  Key.Definition
      Container interface for all the definitions.
      static interface  Key.DefinitionStages
      Grouping of key definition stages.
      static interface  Key.Update
      The template for a key update operation, containing all the settings that can be modified.
      static interface  Key.UpdateStages
      Grouping of key update stages.
      static interface  Key.UpdateWithCreate
      The template for a key vault update operation, with a new key version to be created.
      static interface  Key.UpdateWithImport
      The template for a key vault update operation, with a new key version to be imported.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.azure.security.keyvault.keys.models.KeyProperties attributes()  
      byte[] backup()  
      Mono<byte[]> backupAsync()  
      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 getJsonWebKey()  
      Mono<com.azure.security.keyvault.keys.models.JsonWebKey> getJsonWebKeyAsync()  
      com.azure.core.http.rest.PagedIterable<Key> listVersions()  
      com.azure.core.http.rest.PagedFlux<Key> listVersionsAsync()  
      boolean managed()  
      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.
      Map<String,​String> 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.
      boolean verify​(com.azure.security.keyvault.keys.cryptography.models.SignatureAlgorithm algorithm, byte[] digest, byte[] signature)
      Verifies a signature from a digest.
      Mono<Boolean> 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.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 Detail

      • 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

        Map<String,​String> 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 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