rohrpost

A commandline mail client to change the world as we see it.
git clone git://r-36.net/rohrpost
Log | Files | Refs | LICENSE

commit 2eb19a39ff306b2092b5f144b4267edc1f5223fb
parent a5ac62e0573501ff40cfc0baa638415a97a0a429
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 29 Jan 2012 13:32:24 +0100

Adding a (semi-)random boundary generation.

Diffstat:
mime.c | 7+++++++
mime.h | 1+
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/mime.c b/mime.c @@ -1205,6 +1205,13 @@ mime_mkfilename(char *id, mime_t *mime) return smprintf("%s.%s.part", id, mime->partid); } +char * +mime_mkboundary(void) +{ + srand(time(NULL)); + return smprintf("=--= _TUlNRSBTdWNrcyEK/%x_ =--=", rand()); +} + void mimeusage(void) { diff --git a/mime.h b/mime.h @@ -50,6 +50,7 @@ char *mime_decodepartencoding(mime_t *mime, int *len); char *mime_decodepart(mime_t *mime, int *len); char *mime_filename(mime_t *mime); char *mime_mkfilename(char *id, mime_t *mime); +char *mime_mkboundary(void); int mimemain(int argc, char *argv[]);