Class ExportUtilR17
java.lang.Object
com.aquima.interactions.ds.export.r17.ExportUtilR17
Utility class for decrypting/encrypting and signing/validating of exports.
- Since:
- 17.1
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
createExportName
(String name, Version version, String prefix) Creates an export name that can be used as filename for an export.static void
Decrypts and unzips the data and put it in an input stream.static void
GZips and encrypts the data.static void
Signs a documentstatic SignatureValidationResult
Validates the data with the specified signature.
-
Method Details
-
createExportName
Creates an export name that can be used as filename for an export.- Parameters:
name
- the name of application/moduleversion
- the version of the application/moduleprefix
- optional prefix (e.g. test)- Returns:
- an exportname
-
encrypt
GZips and encrypts the data.Decrypt with
decrypt(Document)
- Parameters:
document
- the document to encrypt- Throws:
CryptoGraphicException
- when the data cannot be encryptedIOException
- when the message cannot be gzipped
-
decrypt
Decrypts and unzips the data and put it in an input stream.Encrypt with
encrypt(Document)
- Parameters:
document
- the document to decrypt- Throws:
CryptoGraphicException
- when the data cannot be encrypted
-
sign
Signs a documentValidate with
validate(Document)
}- Parameters:
document
- the document to signprivateKeyResource
- the private key resource that is used for signing.- Throws:
CryptoGraphicException
- when there the signature cannot be created.
-
validate
Validates the data with the specified signature.Sign with
sign(Document, IResource)
- Parameters:
xmlDocument
- the document to validate a signature for- Returns:
- an object that represents the result of the signature validation
- Throws:
CryptoGraphicException
- when the data is not valid with the signature
-