1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

New. Based on code from ../sm/base64.c.

This commit is contained in:
Werner Koch 2004-02-10 19:27:54 +00:00
parent a1dd1cc223
commit f0d63ef75d
4 changed files with 234 additions and 2 deletions

View file

@ -1,5 +1,5 @@
/* util.h - Utility functions for Gnupg
* Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
/* util.h - Utility functions for GnuPG
* Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -98,6 +98,22 @@ int answer_is_yes_no_default (const char *s, int def_answer);
int answer_is_yes_no_quit (const char *s);
/*-- b64enc.c --*/
struct b64state
{
unsigned int flags;
int idx;
int quad_count;
FILE *fp;
char *title;
unsigned char radbuf[4];
};
gpg_error_t b64enc_start (struct b64state *state, FILE *fp, const char *title);
gpg_error_t b64enc_write (struct b64state *state,
const void *buffer, size_t nbytes);
gpg_error_t b64enc_finish (struct b64state *state);
/*-- miscellaneous.c --*/
/* Same as asprintf but return an allocated buffer suitable to be