From a64958a8805b6ef1758293697e63309d3ddbe4ae Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 30 Mar 2011 17:49:01 +1100 Subject: lib/util Move base64 functions into lib/util/base64.c Andrew Bartlett --- lib/util/util.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lib/util/util.h') diff --git a/lib/util/util.h b/lib/util/util.h index 48d6566dd0..45779912f3 100644 --- a/lib/util/util.h +++ b/lib/util/util.h @@ -409,6 +409,19 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2); **/ _PUBLIC_ void string_replace(char *s, char oldc, char newc); +/** + Base64 decode a string, place into a data blob. Caller to data_blob_free() the result. +**/ +_PUBLIC_ DATA_BLOB base64_decode_data_blob(const char *s); +/** + Base64 decode a string, inplace +**/ +_PUBLIC_ void base64_decode_inplace(char *s); +/** + Base64 encode a binary data blob into a string +**/ +_PUBLIC_ char *base64_encode_data_blob(TALLOC_CTX *mem_ctx, DATA_BLOB data); + /** * Compare 2 strings. * -- cgit