/* License: GPL */
/* Copyright (c) University of Cambridge 1995 - 2018 */
+/* Copyright (c) The Exim Maintainers 2020 */
/* See the file NOTICE for conditions of use and distribution. */
int x, y;
uschar *result;
-{
+ {
int l = Ustrlen(code);
- *ptr = result = store_get(1 + l/4 * 3 + l%4);
-}
+ *ptr = result = store_get(1 + l/4 * 3 + l%4, code);
+ }
/* Each cycle of the loop handles a quantum of 4 input bytes. For the last
quantum this may decode to 1, 2, or 3 output bytes. */
Arguments:
clear points to the clear text bytes
len the number of bytes to encode
+ proto_mem taint indicator
Returns: a pointer to the zero-terminated base 64 string, which
is in working store
US"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
uschar *
-b64encode(uschar *clear, int len)
+b64encode_taint(const uschar * clear, int len, const void * proto_mem)
{
-uschar *code = store_get(4*((len+2)/3) + 1);
-uschar *p = code;
+uschar * code = store_get(4*((len+2)/3) + 1, proto_mem);
+uschar * p = code;
while (len-- >0)
{
return code;
}
+uschar *
+b64encode(const uschar * clear, int len)
+{
+return b64encode_taint(clear, len, clear);
+}
+
/* End of base64.c */
/* vi: sw ai sw=2