aboutsummaryrefslogtreecommitdiffstats
path: root/gpgmeplug/cryptplug.h
diff options
context:
space:
mode:
authorKarl-Heinz Zimmer <[email protected]>2002-03-22 10:40:24 +0000
committerKarl-Heinz Zimmer <[email protected]>2002-03-22 10:40:24 +0000
commitcf04fed2deb7b222d32c1fbe1acf6a0c4bd243b0 (patch)
tree022b7f11ff6a9e2100b83d76974d812adac64d4e /gpgmeplug/cryptplug.h
parentchanged code according to our hack before CeBIT, we are giving *binary* data ... (diff)
downloadgpgme-cf04fed2deb7b222d32c1fbe1acf6a0c4bd243b0.tar.gz
gpgme-cf04fed2deb7b222d32c1fbe1acf6a0c4bd243b0.zip
interface change: signMessage() and encryptMessage() now return an additional 'cipherLen' parameter to enable us to handle binary cipher data
Diffstat (limited to 'gpgmeplug/cryptplug.h')
-rw-r--r--gpgmeplug/cryptplug.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/gpgmeplug/cryptplug.h b/gpgmeplug/cryptplug.h
index e3aea6ca..c390b6e6 100644
--- a/gpgmeplug/cryptplug.h
+++ b/gpgmeplug/cryptplug.h
@@ -1386,7 +1386,12 @@ struct StructuringInfo {
/*! \ingroup groupSignAct
\brief Signs a message \c cleartext and returns
in \c *ciphertext the signature data bloc that
- is to be added to the message.
+ is to be added to the message. The length returned
+ in \c *cipherLen tells you the size (==amount of bytes)
+ of the ciphertext, if the structuring information
+ would return with contentTEncCode set to "base64"
+ the ciphertext might contain a char 0x00
+ and has to be converted into base64 before sending.
The signature role is specified by \c certificate.
If \c certificate is \c NULL, the default certificate is used.
@@ -1416,6 +1421,7 @@ struct StructuringInfo {
*/
bool signMessage( const char* cleartext,
const char** ciphertext,
+ const size_t* cipherLen,
const char* certificate,
struct StructuringInfo* structuring );
@@ -1477,6 +1483,12 @@ bool findCertificates( const char* addressee, char** certificates );
\c cleartext according to the \c addressee and
the current settings (algorithm, etc.) and
returns the encoded data bloc in \c *ciphertext.
+ The length returned in \c *cipherLen tells you the
+ size (==amount of bytes) of the ciphertext, if the
+ structuring information would return with
+ contentTEncCode set to "base64" the ciphertext
+ might contain a char 0x00 and has to be converted
+ into base64 before sending.
If the message could be encrypted, the function returns
\c true, otherwise
@@ -1501,6 +1513,7 @@ bool findCertificates( const char* addressee, char** certificates );
*/
bool encryptMessage( const char* cleartext,
const char** ciphertext,
+ const size_t* cipherLen,
const char* addressee,
struct StructuringInfo* structuring );