security/nss/lib/util/base64.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/util/base64.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +/*
     1.9 + * base64.h - prototypes for base64 encoding/decoding
    1.10 + * Note: These functions are deprecated; see nssb64.h for new routines.
    1.11 + */
    1.12 +#ifndef _BASE64_H_
    1.13 +#define _BASE64_H_
    1.14 +
    1.15 +#include "utilrename.h"
    1.16 +#include "seccomon.h"
    1.17 +
    1.18 +SEC_BEGIN_PROTOS
    1.19 +
    1.20 +/*
    1.21 +** Return an PORT_Alloc'd ascii string which is the base64 encoded
    1.22 +** version of the input string.
    1.23 +*/
    1.24 +extern char *BTOA_DataToAscii(const unsigned char *data, unsigned int len);
    1.25 +
    1.26 +/*
    1.27 +** Return an PORT_Alloc'd string which is the base64 decoded version
    1.28 +** of the input string; set *lenp to the length of the returned data.
    1.29 +*/
    1.30 +extern unsigned char *ATOB_AsciiToData(const char *string, unsigned int *lenp);
    1.31 + 
    1.32 +/*
    1.33 +** Convert from ascii to binary encoding of an item.
    1.34 +*/
    1.35 +extern SECStatus ATOB_ConvertAsciiToItem(SECItem *binary_item, const char *ascii);
    1.36 +
    1.37 +/*
    1.38 +** Convert from binary encoding of an item to ascii.
    1.39 +*/
    1.40 +extern char *BTOA_ConvertItemToAscii(SECItem *binary_item);
    1.41 +
    1.42 +SEC_END_PROTOS
    1.43 +
    1.44 +#endif /* _BASE64_H_ */

mercurial