forked from qca/open-plc-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase64.h
43 lines (33 loc) · 1.4 KB
/
base64.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*====================================================================*
*
* base64.h - base64 encode/decode definitions and declarations;
*
* Motley Tools by Charles Maier <[email protected]>;
* Copyright 2001-2006 by Charles Maier Associates;
* Licensed under the Internet Software Consortium License;
*
*--------------------------------------------------------------------*/
#ifndef BASE64_HEADER
#define BASE64_HEADER
/*====================================================================*
*
*--------------------------------------------------------------------*/
#include <unistd.h>
#include <stdio.h>
/*====================================================================*
* constants;
*--------------------------------------------------------------------*/
#define BASE64_CHARSET "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
#define BASE64_BYTEMASK 0xFF
#define BASE64_CHARMASK 0x3F
#define BASE64_WORDSIZE 32
#define BASE64_BYTESIZE 8
#define BASE64_CHARSIZE 6
/*====================================================================*
* encode/decode functions;
*--------------------------------------------------------------------*/
void b64dump (void const * memory, size_t extent, size_t column, FILE *fp);
/*====================================================================*
*
*--------------------------------------------------------------------*/
#endif