Package com.axway.ats.action.security
Interface PackageEncryptor
-
- All Known Implementing Classes:
SMimePackageEncryptor
public interface PackageEncryptor
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkSignature(Package sourcePackage)
Verifies the signature of a package with the public key specified in the implementation constructorPackage
decrypt(Package sourcePackage)
Decrypts a message (likeMimePackage
) using the arguments provided inPackageEncryptor
implementation constructorPackage
encrypt(Package sourcePackage)
Encrypts the given package (likeMimePackage
) using the arguments provided inPackageEncryptor
implementation constructorString[]
getKeystoreAliases(String keystoreType)
Get all aliases in a keystore with specified typePackage
sign(Package sourcePackage)
Signs aPackage
.
-
-
-
Method Detail
-
encrypt
Package encrypt(Package sourcePackage) throws ActionException
Encrypts the given package (likeMimePackage
) using the arguments provided inPackageEncryptor
implementation constructor- Parameters:
sourcePackage
- the package to encrypt- Returns:
- the encrypted
Package
- Throws:
ActionException
- in case an encryption error occurs
-
decrypt
Package decrypt(Package sourcePackage) throws ActionException
Decrypts a message (likeMimePackage
) using the arguments provided inPackageEncryptor
implementation constructor- Parameters:
sourcePackage
- the package to decrypt- Returns:
- the decrypted
Package
- Throws:
ActionException
- in case an decryption error occurs
-
sign
Package sign(Package sourcePackage) throws ActionException
Signs aPackage
.- Parameters:
sourcePackage
- the package to sign- Returns:
- the new signed
Package
- Throws:
ActionException
- in case an error has occurred while signing the message
-
checkSignature
boolean checkSignature(Package sourcePackage) throws ActionException
Verifies the signature of a package with the public key specified in the implementation constructor- Parameters:
sourcePackage
- the package which signature to check- Returns:
true
if the signature can be confirmed with the current set of key pairs- Throws:
ActionException
- in case an error has occurred while checking the signature of the message
-
getKeystoreAliases
String[] getKeystoreAliases(String keystoreType) throws ActionException
Get all aliases in a keystore with specified type- Parameters:
keystoreType
- the keystore type ( JKS, PKCS12, ... )- Returns:
- array of all aliases in the keystore
- Throws:
ActionException
- in case an error has occurred while reading the keystore
-
-