BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlde.h
Go to the documentation of this file.
1
/// @file bdlde.h
2
///
3
///
4
/// @defgroup bdlde Package bdlde
5
/// @brief Basic Development Library Data Encoder (bdlde)
6
/// @addtogroup bdl
7
/// @{
8
/// @addtogroup bdlde
9
/// @{
10
/// * <a href="#bdlde-purpose"> Purpose</a>
11
/// * <a href="#bdlde-mnemonic"> Mnemonic </a>
12
/// * <a href="#bdlde-description"> Description </a>
13
/// * <a href="#bdlde-hierarchical-synopsis"> Hierarchical Synopsis </a>
14
/// * <a href="#bdlde-component-synopsis"> Component Synopsis </a>
15
/// * <a href="#bdlde-usage"> Usage </a>
16
/// * <a href="#bdlde-example-1-crc-32"> Example 1: CRC-32 </a>
17
/// * <a href="#bdlde-example-2-md5"> Example 2: MD5 </a>
18
///
19
/// # Purpose {#bdlde-purpose}
20
/// Mechanisms for standard encodings and hashings, e.g., base64, md5.
21
///
22
/// # Mnemonic {#bdlde-mnemonic}
23
/// Basic Development Library Data Encoder (bdlde)
24
///
25
/// @see
26
///
27
/// # Description {#bdlde-description}
28
/// The 'bdlde' package provides mechanisms (typically in the form of
29
/// fully value-semantic objects) for performing various standard hashings of an
30
/// input dataset, for, e.g., basic encoding, check-sums, and cryptographic
31
/// hashes.
32
///
33
/// ## Hierarchical Synopsis {#bdlde-hierarchical-synopsis}
34
///
35
/// The 'bdlde' package currently has 23 components having 4 levels of physical
36
/// dependency. The list below shows the hierarchical ordering of the components.
37
/// The order of components within each level is not architecturally significant,
38
/// just alphabetical.
39
/// @code
40
/// 4. bdlde_base64decoder
41
///
42
/// 3. bdlde_base64encoder
43
///
44
/// 2. bdlde_base64decoderoptions
45
/// bdlde_base64encoderoptions
46
/// bdlde_charconvertucs2
47
/// bdlde_charconvertutf16
48
/// bdlde_charconvertutf32
49
/// bdlde_utf8checkinginstreambufwrapper
50
///
51
/// 1. bdlde_base64alphabet
52
/// bdlde_base64ignoremode
53
/// bdlde_byteorder
54
/// bdlde_charconvertstatus
55
/// bdlde_crc32
56
/// bdlde_crc32c
57
/// bdlde_crc64
58
/// bdlde_hexdecoder
59
/// bdlde_hexencoder
60
/// bdlde_md5
61
/// bdlde_quotedprintabledecoder
62
/// bdlde_quotedprintableencoder
63
/// bdlde_sha1
64
/// bdlde_sha2
65
/// bdlde_utf8util
66
/// @endcode
67
///
68
/// ## Component Synopsis {#bdlde-component-synopsis}
69
///
70
/// @ref bdlde_base64alphabet :
71
/// Provide an enumeration of the set of possible base 64 alphabets.
72
///
73
/// @ref bdlde_base64decoder :
74
/// Provide automata for converting to and from Base64 encodings.
75
///
76
/// @ref bdlde_base64decoderoptions :
77
/// Provide value-semantic attribute class for decoder options.
78
///
79
/// @ref bdlde_base64encoder :
80
/// Provide automata for converting to and from Base64 encodings.
81
///
82
/// @ref bdlde_base64encoderoptions :
83
/// Provide a value-semantic attribute class for encoder options.
84
///
85
/// @ref bdlde_base64ignoremode :
86
/// Provide an enumeration of the set of possible base64 ignore modes.
87
///
88
/// @ref bdlde_byteorder :
89
/// Provide an enumeration of the set of possible byte orders.
90
///
91
/// @ref bdlde_charconvertstatus :
92
/// Provide masks for interpreting status from charconvert functions.
93
///
94
/// @ref bdlde_charconvertucs2 :
95
/// Provide efficient conversions between UTF-8 and UCS-2 encodings.
96
///
97
/// @ref bdlde_charconvertutf16 :
98
/// Provide fast, safe conversion between UTF-8 and UTF-16 encodings.
99
///
100
/// @ref bdlde_charconvertutf32 :
101
/// Provide fast, safe conversion between UTF-8 encoding and UTF-32.
102
///
103
/// @ref bdlde_crc32 :
104
/// Provide a mechanism for computing the CRC-32 checksum of a dataset.
105
///
106
/// @ref bdlde_crc32c :
107
/// Provide utilities to calculate the CRC32-C checksum of a dataset.
108
///
109
/// @ref bdlde_crc64 :
110
/// Provide a mechanism for computing the CRC-64 checksum of a dataset.
111
///
112
/// @ref bdlde_hexdecoder :
113
/// Provide mechanism for decoding text from hexadecimal.
114
///
115
/// @ref bdlde_hexencoder :
116
/// Provide mechanism for encoding text into hexadecimal.
117
///
118
/// 'bdlde_md5':
119
/// Provide a value-semantic type encoding a message in an MD5 digest.
120
///
121
/// @ref bdlde_quotedprintabledecoder :
122
/// Provide automata converting to and from Quoted-Printable encodings.
123
///
124
/// @ref bdlde_quotedprintableencoder :
125
/// Provide automata converting to and from Quoted-Printable encodings.
126
///
127
/// @ref bdlde_sha1 :
128
/// Provide a value-semantic type encoding a message in a SHA-1 digest.
129
///
130
/// @ref bdlde_sha2 :
131
/// Provide a value-semantic type encoding a message in a SHA-2 digest.
132
///
133
/// @ref bdlde_utf8checkinginstreambufwrapper :
134
/// Provide a stream buffer wrapper for validating UTF-8 input.
135
///
136
/// @ref bdlde_utf8util :
137
/// Provide basic utilities for UTF-8 encodings.
138
///
139
/// ## Usage {#bdlde-usage}
140
///
141
/// This section illustrates intended use of this package.
142
///
143
/// ### Example 1: CRC-32 {#bdlde-example-1-crc-32}
144
///
145
/// The following snippets of code illustrate a typical use of the 'bdlde_Crc32'
146
/// class. Each function would typically execute in separate processes or
147
/// potentially on separate machines. The 'senderExample' function below
148
/// demonstrates how a message sender can write a message and its CRC-32 checksum
149
/// to a 'bdlx' output stream. Note that 'Out' may be a 'typedef' of any class
150
/// that implements the 'bdlx_OutStream' protocol:
151
/// @code
152
/// void senderExample(Out& output)
153
/// // Write a message and its CRC-32 checksum to the specified 'output'
154
/// // stream.
155
/// {
156
/// // prepare a message
157
/// bdl::string message = "This is a test message.";
158
///
159
/// // generate a checksum for 'message'
160
/// bdlde_Crc32 crc(message.data(), message.length());
161
///
162
/// // write the message to 'output'
163
/// output << message;
164
///
165
/// // write the checksum to 'output'
166
/// output << crc;
167
/// }
168
/// @endcode
169
/// The 'receiverExample' function below illustrates how a message receiver can
170
/// read a message and its CRC-32 checksum from a 'bdlx' input stream, then
171
/// perform a local CRC-32 computation to verify that the message was received
172
/// intact. Note that 'In' may be a 'typedef' of any class that implements the
173
/// 'bdlx_InStream' protocol:
174
/// @code
175
/// void receiverExample(In& input)
176
/// // Read a message and its CRC-32 checksum from the specified 'input'
177
/// // stream, and verify the integrity of the message.
178
/// {
179
/// // read the message from 'input'
180
/// bdl::string message;
181
/// input >> message;
182
///
183
/// // read the checksum from 'input'
184
/// bdlde_Crc32 crc;
185
/// input >> crc;
186
///
187
/// // locally compute the checksum of the received 'message'
188
/// bdlde_Crc32 crcLocal;
189
/// crcLocal.update(message.data(), message.length());
190
///
191
/// // verify that the received and locally-computed checksums match
192
/// assert(crcLocal == crc);
193
/// }
194
/// @endcode
195
///
196
/// ### Example 2: MD5 {#bdlde-example-2-md5}
197
///
198
/// The following snippets of code illustrate a typical use of the 'bdlde_Md5'
199
/// class. Each function would typically execute in separate processes or
200
/// potentially on separate machines. The 'senderExample' function below
201
/// demonstrates how a message sender can write a message and its MD5 hash to a
202
/// 'bdlx' output stream. Note that 'Out' may be a 'typedef' of any class that
203
/// implements the 'bdlx_OutStream' protocol:
204
/// @code
205
/// void senderExample(Out& output)
206
/// // Write a message and its MD5 hash to the specified 'output' stream.
207
/// {
208
/// // prepare a message
209
/// bdl::string message = "This is a test message.";
210
///
211
/// // generate a hash for 'message'
212
/// bdlde_Md5 hash(message.data(), message.length());
213
///
214
/// // write the message to 'output'
215
/// output << message;
216
///
217
/// // write the hash to 'output'
218
/// output << hash;
219
/// }
220
/// @endcode
221
/// The 'receiverExample' function below illustrates how a message receiver can
222
/// read a message and its MD5 hash from a 'bdlx' input stream, then perform a
223
/// local MD5 computation to verify that the message was received intact. Note
224
/// that 'In' may be a 'typedef' of any class that implements the 'bdlx_InStream'
225
/// protocol:
226
/// @code
227
/// void receiverExample(In& input)
228
/// // Read a message and its MD5 hash from the specified 'input' stream,
229
/// // and verify the integrity of the message.
230
/// {
231
/// // read the message from 'input'
232
/// bdl::string message;
233
/// input >> message;
234
///
235
/// // read the hash from 'input'
236
/// bdlde_Md5 hash;
237
/// input >> hash;
238
///
239
/// // locally compute the hash of the received 'message'
240
/// bdlde_Md5 hashLocal;
241
/// hashLocal.update(message.data(), message.length());
242
///
243
/// // verify that the received and locally-computed hashes match
244
/// assert(hashLocal == hash);
245
/// }
246
/// @endcode
247
///
248
/// @}
249
/** @} */
doxygen_input
bde
groups
bdl
bdlde
doc
bdlde.h
Generated by
1.9.8