Statistics
| Branch: | Tag: | Revision:

root / libsylph / base64.h @ aebfd4cc

History | View | Annotate | Download (635 Bytes)

1
/*
2
 * LibSylph -- E-Mail client library
3
 * Copyright (C) 1999-2011 Hiroyuki Yamamoto
4
 */
5

    
6
#ifndef __BASE64_H__
7
#define __BASE64_H__
8

    
9
#include <glib.h>
10

    
11
typedef struct _Base64Decoder        Base64Decoder;
12

    
13
struct _Base64Decoder
14
{
15
        gint buf_len;
16
        gchar buf[4];
17
};
18

    
19
void base64_encode        (gchar                *out,
20
                         const guchar        *in,
21
                         gint                 inlen);
22
gint base64_decode        (guchar                *out,
23
                         const gchar        *in,
24
                         gint                 inlen);
25

    
26
Base64Decoder *base64_decoder_new        (void);
27
void               base64_decoder_free        (Base64Decoder        *decoder);
28
gint               base64_decoder_decode        (Base64Decoder        *decoder,
29
                                         const gchar        *in,
30
                                         guchar                *out);
31

    
32
#endif /* __BASE64_H__ */