HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
UT_Base64.h
Go to the documentation of this file.
1
/*
2
* PROPRIETARY INFORMATION. This software is proprietary to
3
* Side Effects Software Inc., and is not to be reproduced,
4
* transmitted, or disclosed in any way without written permission.
5
*
6
* NAME: UT_Base64.h ( UT Library, C++)
7
*
8
* COMMENTS:
9
*/
10
11
#ifndef __UT_Base64__
12
#define __UT_Base64__
13
14
#include "
UT_API.h
"
15
16
#include <
SYS/SYS_Types.h
>
17
18
class
UT_WorkBuffer
;
19
class
UT_IStream
;
20
class
UT_StringView
;
21
22
class
UT_API
UT_Base64
23
{
24
public
:
25
/// @{
26
/// Encode a stream of binary into base64 encoding. If the input is not
27
/// a multiple of three, padding is added to indicate proper size.
28
static
void
encode(
const
UT_WorkBuffer
&
src
,
UT_WorkBuffer
&
dst
);
29
static
void
encode(
const
uint8
*src,
exint
src_len,
UT_WorkBuffer
&dst);
30
static
void
encode(
const
UT_StringView
&src,
UT_WorkBuffer
&dst);
31
/// @}
32
33
/// @{
34
/// Decode a base64 encoded string into binary. Returns @c false if
35
/// decoding failed (bad input character, or wrong padding). Whitespace
36
/// is ignored on parsing.
37
static
bool
decode(
const
UT_WorkBuffer
&src,
UT_WorkBuffer
&dst);
38
static
bool
decode(
const
UT_StringView
&
view
,
UT_WorkBuffer
& dst);
39
static
bool
decode(
UT_IStream
&is,
UT_WorkBuffer
&dst);
40
/// @}
41
42
private
:
43
static
bool
decode_(
const
char
* src,
exint
len,
UT_WorkBuffer
& dst);
44
};
45
46
#endif // __UT_Base64__
UT_WorkBuffer
Definition:
UT_WorkBuffer.h:74
UT_IStream
Definition:
UT_IStream.h:56
exint
int64 exint
Definition:
SYS_Types.h:125
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
uint8
unsigned char uint8
Definition:
SYS_Types.h:36
UT_StringView
A utility class to do read-only operations on a subset of an existing string.
Definition:
UT_StringView.h:39
SYS_Types.h
dst
GLenum GLenum dst
Definition:
glcorearb.h:1793
view
Definition:
core.h:982
UT_Base64
Definition:
UT_Base64.h:22
src
GLenum src
Definition:
glcorearb.h:1793
UT
UT_Base64.h
Generated on Tue Dec 17 2024 03:42:07 for HDK by
1.8.6