added anonymous sender key (-A) support

This commit is contained in:
git@daemon.de
2014-08-11 15:45:47 +02:00
parent e022a9e842
commit 298e6b1469
11 changed files with 131 additions and 69 deletions

View File

@@ -34,7 +34,7 @@ int main() {
/* actually encrypt the message, don't sign it
Alice is the sender, Bob is the recipient */
pcp_encrypt_stream(ptx, clear_in, crypt_out, alice, pubhash, 0);
pcp_encrypt_stream(ptx, clear_in, crypt_out, alice, pubhash, 0, 0);
/* now, print the encrypted result */
fprintf(stderr, "Alice encrypted %"FMT_SIZE_T" bytes for Bob:\n", (SIZE_T_CAST)strlen(message));
@@ -51,7 +51,7 @@ int main() {
pcphash_add(ptx, alicepub, alicepub->type);
/* try to decrypt the message */
if(pcp_decrypt_stream(ptx, crypt_out, clear_out, bob, NULL, 0) == 0)
if(pcp_decrypt_stream(ptx, crypt_out, clear_out, bob, NULL, 0, 0) == 0)
fatals_ifany(ptx);
else {
/* and finally print out the decrypted message */