michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* michael@0: * base64.h - prototypes for base64 encoding/decoding michael@0: * Note: These functions are deprecated; see nssb64.h for new routines. michael@0: */ michael@0: #ifndef _BASE64_H_ michael@0: #define _BASE64_H_ michael@0: michael@0: #include "utilrename.h" michael@0: #include "seccomon.h" michael@0: michael@0: SEC_BEGIN_PROTOS michael@0: michael@0: /* michael@0: ** Return an PORT_Alloc'd ascii string which is the base64 encoded michael@0: ** version of the input string. michael@0: */ michael@0: extern char *BTOA_DataToAscii(const unsigned char *data, unsigned int len); michael@0: michael@0: /* michael@0: ** Return an PORT_Alloc'd string which is the base64 decoded version michael@0: ** of the input string; set *lenp to the length of the returned data. michael@0: */ michael@0: extern unsigned char *ATOB_AsciiToData(const char *string, unsigned int *lenp); michael@0: michael@0: /* michael@0: ** Convert from ascii to binary encoding of an item. michael@0: */ michael@0: extern SECStatus ATOB_ConvertAsciiToItem(SECItem *binary_item, const char *ascii); michael@0: michael@0: /* michael@0: ** Convert from binary encoding of an item to ascii. michael@0: */ michael@0: extern char *BTOA_ConvertItemToAscii(SECItem *binary_item); michael@0: michael@0: SEC_END_PROTOS michael@0: michael@0: #endif /* _BASE64_H_ */