I'm using Mirth Connect Server 3.1.0.7420. The channel I'm working on uses a File Reader source to find CSV files within a directory. For each CSV file found, it's turned into XML and a JavaScript transformer is used to map incoming data out into another file format.
At this point, the source CSV file has become an XML document (the "msg" variable) to be passed onto different destinations. One of the destinations will need to encrypt the XML document with a PGP public key before storing the file locally.
This is where my question comes in:
I believe I need to use a File Writer to store the encrypted data and use a JavaScript transformer to encrypt the XML document. Is that correct? I have a function that basically says:
function PGPEncrypt(string, pgpFileLocation)
{
// encryption work happens here
return encryptedString;
}
What would the code in my JavaScript transformer look like?
At this point, the source CSV file has become an XML document (the "msg" variable) to be passed onto different destinations. One of the destinations will need to encrypt the XML document with a PGP public key before storing the file locally.
This is where my question comes in:
I believe I need to use a File Writer to store the encrypted data and use a JavaScript transformer to encrypt the XML document. Is that correct? I have a function that basically says:
function PGPEncrypt(string, pgpFileLocation)
{
// encryption work happens here
return encryptedString;
}
What would the code in my JavaScript transformer look like?
Store PGP encrypted data using file writer
0 commentaires:
Enregistrer un commentaire