Class HSM


  • public abstract class HSM
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      HSM()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract byte[] decrypt​(java.lang.String algorithm, byte[] cipherText)
      Decrypts an array of bytes with a particular algorithm using the HSM.
      abstract byte[] encrypt​(java.lang.String algorithm, byte[] plainText)
      Encrypts an array of bytes with a particular algorithm using the HSM.
      abstract void setClient()
      Sets the client to connect to the Azure Key Vault.
      abstract byte[] unwrapKey​(java.lang.String algorithmUrl, byte[] wrappedKey)
      Unwraps a key with a particular algorithm using the HSM.
      abstract byte[] wrapKey​(java.lang.String algorithm, byte[] key)
      Wraps a key with a particular algorithm using the HSM
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HSM

        public HSM()
    • Method Detail

      • setClient

        public abstract void setClient()
        Sets the client to connect to the Azure Key Vault.
      • wrapKey

        public abstract byte[] wrapKey​(java.lang.String algorithm,
                                       byte[] key)
        Wraps a key with a particular algorithm using the HSM
        Parameters:
        algorithm - The algorithm to use to wrap the key.
        key - The key to wrap
        Returns:
        A wrapped key.
      • unwrapKey

        public abstract byte[] unwrapKey​(java.lang.String algorithmUrl,
                                         byte[] wrappedKey)
        Unwraps a key with a particular algorithm using the HSM.
        Parameters:
        algorithmUrl - The algorithm URL to use to unwrap the key.
        wrappedKey - The key to unwrap
        Returns:
        An unwrapped key.
      • encrypt

        public abstract byte[] encrypt​(java.lang.String algorithm,
                                       byte[] plainText)
        Encrypts an array of bytes with a particular algorithm using the HSM.
        Parameters:
        algorithm - The algorithm to use for encryption.
        plainText - The array of bytes to encrypt.
        Returns:
        An encrypted array of bytes.
      • decrypt

        public abstract byte[] decrypt​(java.lang.String algorithm,
                                       byte[] cipherText)
        Decrypts an array of bytes with a particular algorithm using the HSM.
        Parameters:
        algorithm - The algorithm to use for decryption.
        cipherText - The encrypted array of bytes.
        Returns:
        A decrypted array of bytes.