The PGP Encryption software executes from a command line like so:
>pgp –encrypt [file.dat] –user [key id]
>pgp –decrypt [file.dat.pgp] — passphrase [passphrase]
Where “file.dat” is the interchange that is to be encoded by the public key with its ”key id”. “file.dat.pgp” is an encrypted file that is to be decoded by the private key to which the secret ”passphrase” must be provided.
The final custom component will execute the encryption software by passing it a constructed command line. The first step is to recognize that the pipeline will be handling a stream of data, not an entire file, upon which the encryption software must work. The encryption software needs a defined file, not a stream. Therefore, we must convert that stream into a file, then convert the completed file back into a stream once the encryption process is completed. The new FileStream class in BizTalk will work for this purpose.
In general our initial code will be in this form.
