~ubuntu-branches/ubuntu/oneiric/libotr/oneiric-security

« back to all changes in this revision

Viewing changes to src/b64.h

  • Committer: Bazaar Package Importer
  • Author(s): Thibaut VARENE
  • Date: 2006-01-02 19:52:18 UTC
  • mfrom: (2.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060102195218-wb8803196y9mycx6
Tags: 3.0.0-2
Fix typo: "malformed messahes" (Closes: #345400)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
size_t otrl_base64_decode(char *data, const unsigned char *base64data,
40
40
        size_t base64len);
41
41
 
 
42
/*
 
43
 * Base64-encode a block of data, stick "?OTR:" and "." around it, and
 
44
 * return the result, or NULL in the event of a memory error.
 
45
 */
 
46
char *otrl_base64_otr_encode(const unsigned char *buf, size_t buflen);
 
47
 
 
48
/*
 
49
 * Base64-decode the portion of the given message between "?OTR:" and
 
50
 * ".".  Set *bufp to the decoded data, and set *lenp to its length.
 
51
 * The caller must free() the result.  Return 0 on success, -1 on a
 
52
 * memory error, or -2 on invalid input.
 
53
 */
 
54
int otrl_base64_otr_decode(const char *msg, unsigned char **bufp,
 
55
        size_t *lenp);
 
56
 
42
57
#endif