Package com.onelogin.saml2.model.hsm
Class HSM
- java.lang.Object
-
- com.onelogin.saml2.model.hsm.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 voidsetClient()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
-
-
-
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.
-
-