You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

4 years ago
// p≡p Message API
// Copyleft (c) 2019, p≡p foundation
4 years ago
// this file is under GNU General Public License 3.0
// see LICENSE.txt
// written by Volker Birk
protocol session {
method encrypt_message
doc="encrypt message in memory"
// parms
supply message src
message to encrypt - usually in-only, but can be in-out for
unencrypted messages; in that case, we may attach the key and
decorate the message
use hash_list extra doc="extra keys for encryption";
create message dst
pointer to new encrypted message or #NV if no encryption could
take place
use encformat format doc="encrypted format";
// flags
flags {
4 years ago
flag default 0x0 doc='"default" means whatever the default behaviour for the function is.';
flag force_encryption 0x1;
// exceptions
throws key_has_ambig_name
doc="at least one of the receipient keys has an ambiguous name";
throws unencrypted
on demand or no recipients with usable key, is left unencrypted,
and key is attached to it