+
+/* Includes trailing NUL */
+
+#define BASE64SIZE(x) ((((x + 2) / 3) * 4) + 1)
+
+/*
+ * Copy data from one file to another, converting to base64-encoding.
+ *
+ * Arguments include:
+ *
+ * in - Input filehandle (unencoded data)
+ * out - Output filename (base64-encoded data)
+ * crlf - If set, output encoded CRLF for every LF on input.
+ *
+ * Returns OK on success, NOTOK otherwise.
+ */
+int writeBase64aux(FILE *in, FILE *out, int crlf);
+
+int writeBase64 (const unsigned char *, size_t, unsigned char *);
+int writeBase64raw (const unsigned char *, size_t, unsigned char *);
+
+/*
+ * first argument: the string to be decoded
+ * second argument: the decoded bytes
+ * third argument: number of decoded bytes
+ * fourth argument: non-zero for text content, and for which CR's should be skipped
+ * fifth argument: for an MD5 digest, it can be null
+ */
+int decodeBase64 (const char *, const char **, size_t *, int, unsigned char *);
+
+void hexify (const unsigned char *, size_t, char **);
+
+/*
+ * credentials management
+ */
+void init_credentials_file ();
+int nmh_get_credentials (char *, char *, int, nmh_creds_t);
+
+/*
+ * temporary file management
+ */
+int nmh_init(const char *argv0, int read_context);
+int m_unlink(const char *);
+void unregister_for_removal(int remove_files);