To keep the Decrypt function consistent with my
suggestion for the Encrypt function, the following
change to the Decrypt function call is suggested:
Decrypt(string SourceFile, string ResultFile, string
SecKeyID, string passphrase)
Two main reasons for this:
1. You ALWAYS need your passphrase when you
decrypt, so why rely on another function
(SetEnvironment) to povided it rather than make it a
requirement in the Decrypt function?
2. The recipient may have several key pairs, and
may receive encrypted data from many senders,
who may not all have the SAME public key for this
recipient. The recipient should be able to choose
which secret key to use to decrypt which file, and
do so in a loop calling the Decrypt function, rather
than have to call SetEnvironment first on each pass
of the loop to change the SecKey/Passphrase.
This is also a good argument for my previous
suggestion for a similar change in the Encrypt
function, where signing would be optional, but
would require the SecKey/Passphrase when used.
Logged In: YES
user_id=436438
Would a function like this help?
Decrypt_ex(pchar SourceFile, pchar ResultFile, pchar
SecKeyID, pchar passphrase);
or perhaps a generic getter/setter for the passphrase, though
that wouldn't solve the sec key issue.
John