java.lang.Object
org.codelibs.saml2.core.model.hsm.HSM
- Direct Known Subclasses:
AzureKeyVault
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]Decrypts an array of bytes with a particular algorithm using the HSM.abstract byte[]Encrypts an array of bytes with a particular algorithm using the HSM.abstract voidSets the client to connect to the Azure Key Vault.abstract byte[]Unwraps a key with a particular algorithm using the HSM.abstract byte[]Wraps a key with a particular algorithm using the HSM
-
Constructor Details
-
HSM
public HSM()
-
-
Method Details
-
setClient
public abstract void setClient()Sets the client to connect to the Azure Key Vault. -
wrapKey
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
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
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
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.
-