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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>buffer</title>
<meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
<link rel="HOME" title="XML Security Library Reference Manual" href="index.html">
<link rel="UP" title="XML Security Core Library API Reference." href="xmlsec-ref.html">
<link rel="PREVIOUS" title="bn" href="xmlsec-bn.html">
<link rel="NEXT" title="dl" href="xmlsec-dl.html">
<style type="text/css">.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #770000;
}
.navigation a:visited {
color: #550000;
}
.navigation .title {
font-size: 200%;
}</style>
</head>
<body><table witdh="100%" valign="top"><tr valign="top">
<td valign="top" align="left" width="210">
<img src="../images/logo.gif" alt="XML Security Library" border="0"><p></p>
<ul>
<li><a href="../index.html">Home</a></li>
<li><a href="../download.html">Download</a></li>
<li><a href="../news.html">News</a></li>
<li><a href="../documentation.html">Documentation</a></li>
<ul>
<li><a href="../faq.html">FAQ</a></li>
<li><a href="../api/xmlsec-notes.html">Tutorial</a></li>
<li><a href="../api/xmlsec-reference.html">API reference</a></li>
<li><a href="../api/xmlsec-examples.html">Examples</a></li>
</ul>
<li><a href="../xmldsig.html">XML Digital Signature</a></li>
<ul><li><a href="http://www.aleksey.com/xmlsec/xmldsig-verifier.html">Online Verifier</a></li></ul>
<li><a href="../xmlenc.html">XML Encryption</a></li>
<li><a href="../c14n.html">XML Canonicalization</a></li>
<li><a href="../bugs.html">Reporting Bugs</a></li>
<li><a href="http://www.aleksey.com/pipermail/xmlsec">Mailing list</a></li>
<li><a href="../related.html">Related</a></li>
<li><a href="../authors.html">Authors</a></li>
</ul>
<table width="100%">
<tr>
<td width="15"></td>
<td><a href="http://xmlsoft.org/"><img src="../images/libxml2-logo.png" alt="LibXML2" border="0"></a></td>
</tr>
<tr>
<td width="15"></td>
<td><a href="http://xmlsoft.org/XSLT"><img src="../images/libxslt-logo.png" alt="LibXSLT" border="0"></a></td>
</tr>
<tr>
<td width="15"></td>
<td><a href="http://www.openssl.org/"><img src="../images/openssl-logo.png" alt="OpenSSL" border="0"></a></td>
</tr>
<!--Links - start--><!--Links - end-->
</table>
</td>
<td valign="top"><table width="100%" valign="top"><tr><td valign="top" align="left" id="xmlsecContent">
<table width="100%" class="navigation" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="xmlsec-bn.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="xmlsec-ref.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">XML Security Library Reference Manual</th>
<td><a accesskey="n" href="xmlsec-dl.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<h1>
<a name="XMLSEC-BUFFER"></a>buffer</h1>
<div class="REFNAMEDIV">
<a name="AEN3652"></a><h2>Name</h2>buffer -- Binary buffer implementation.</div>
<div class="REFSYNOPSISDIV">
<a name="XMLSEC-BUFFER.SYNOPSIS"></a><h2>Synopsis</h2>
<pre class="SYNOPSIS">enum <a href="xmlsec-buffer.html#XMLSECALLOCMODE">xmlSecAllocMode</a>;
struct <a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBuffer</a>;
<font>void</font> <a href="xmlsec-buffer.html#XMLSECBUFFERSETDEFAULTALLOCMODE">xmlSecBufferSetDefaultAllocMode</a> (<a href="xmlsec-buffer.html#XMLSECALLOCMODE">xmlSecAllocMode</a> defAllocMode,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> defInitialSize);
<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> <a href="xmlsec-buffer.html#XMLSECBUFFERCREATE">xmlSecBufferCreate</a> (<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>void</font> <a href="xmlsec-buffer.html#XMLSECBUFFERDESTROY">xmlSecBufferDestroy</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERINITIALIZE">xmlSecBufferInitialize</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>void</font> <a href="xmlsec-buffer.html#XMLSECBUFFERFINALIZE">xmlSecBufferFinalize</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);
<a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a>* <a href="xmlsec-buffer.html#XMLSECBUFFERGETDATA">xmlSecBufferGetData</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERSETDATA">xmlSecBufferSetData</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *data,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> <a href="xmlsec-buffer.html#XMLSECBUFFERGETSIZE">xmlSecBufferGetSize</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERSETSIZE">xmlSecBufferSetSize</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> <a href="xmlsec-buffer.html#XMLSECBUFFERGETMAXSIZE">xmlSecBufferGetMaxSize</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERSETMAXSIZE">xmlSecBufferSetMaxSize</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>void</font> <a href="xmlsec-buffer.html#XMLSECBUFFEREMPTY">xmlSecBufferEmpty</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERAPPEND">xmlSecBufferAppend</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *data,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERPREPEND">xmlSecBufferPrepend</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *data,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERREMOVEHEAD">xmlSecBufferRemoveHead</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERREMOVETAIL">xmlSecBufferRemoveTail</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERREADFILE">xmlSecBufferReadFile</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <font>char</font> *filename);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERBASE64NODECONTENTREAD">xmlSecBufferBase64NodeContentRead</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<font>xmlNodePtr</font> node);
<font>int</font> <a href="xmlsec-buffer.html#XMLSECBUFFERBASE64NODECONTENTWRITE">xmlSecBufferBase64NodeContentWrite</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<font>xmlNodePtr</font> node,
<font>int</font> columns);
<font>xmlOutputBufferPtr</font> <a href="xmlsec-buffer.html#XMLSECBUFFERCREATEOUTPUTBUFFER">xmlSecBufferCreateOutputBuffer</a> (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
</div>
<div class="REFSECT1">
<a name="XMLSEC-BUFFER.DESCRIPTION"></a><h2>Description</h2>
<p>Binary buffer implementation.</p>
</div>
<div class="REFSECT1">
<a name="XMLSEC-BUFFER.DETAILS"></a><h2>Details</h2>
<div class="REFSECT2">
<a name="XMLSECALLOCMODE"></a><h3>enum xmlSecAllocMode</h3>
<pre class="PROGRAMLISTING">typedef enum {
xmlSecAllocModeExact = 0,
xmlSecAllocModeDouble
} xmlSecAllocMode;</pre>
<p>The memory allocation mode (used by <code class="PARAMETER">xmlSecBuffer</code> and <code class="PARAMETER">xmlSecList</code>).</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="XMLSECALLOCMODEEXACT"><span style="white-space: nowrap"><tt class="LITERAL">xmlSecAllocModeExact</tt></span></a></td>
<td align="LEFT" valign="TOP"><p> the memory allocation mode that minimizes total
allocated memory size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="XMLSECALLOCMODEDOUBLE"><span style="white-space: nowrap"><tt class="LITERAL">xmlSecAllocModeDouble</tt></span></a></td>
<td align="LEFT" valign="TOP"><p> the memory allocation mode that tries to minimize
the number of malloc calls.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFER"></a><h3>struct xmlSecBuffer</h3>
<pre class="PROGRAMLISTING">struct xmlSecBuffer {
xmlSecByte* data;
xmlSecSize size;
xmlSecSize maxSize;
xmlSecAllocMode allocMode;
};</pre>
<p>Binary data buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3769"><span style="white-space: nowrap"><a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *<code class="STRUCTFIELD">data</code>;</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer data.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3775"><span style="white-space: nowrap"><a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> <code class="STRUCTFIELD">size</code>;</span></a></td>
<td align="LEFT" valign="TOP"><p> the current data size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3781"><span style="white-space: nowrap"><a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> <code class="STRUCTFIELD">maxSize</code>;</span></a></td>
<td align="LEFT" valign="TOP"><p> the max data size (allocated buffer size).</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3787"><span style="white-space: nowrap"><a href="xmlsec-buffer.html#XMLSECALLOCMODE">xmlSecAllocMode</a> <code class="STRUCTFIELD">allocMode</code>;</span></a></td>
<td align="LEFT" valign="TOP"><p> the buffer memory allocation mode.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERSETDEFAULTALLOCMODE"></a><h3>xmlSecBufferSetDefaultAllocMode ()</h3>
<pre class="PROGRAMLISTING"><font>void</font> xmlSecBufferSetDefaultAllocMode (<a href="xmlsec-buffer.html#XMLSECALLOCMODE">xmlSecAllocMode</a> defAllocMode,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> defInitialSize);</pre>
<p>Sets new global default allocation mode and minimal intial size.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3804"><span style="white-space: nowrap"><code class="PARAMETER">defAllocMode</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the new default buffer allocation mode.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3809"><span style="white-space: nowrap"><code class="PARAMETER">defInitialSize</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the new default buffer minimal intial size.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERCREATE"></a><h3>xmlSecBufferCreate ()</h3>
<pre class="PROGRAMLISTING"><a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> xmlSecBufferCreate (<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Allocates and initalizes new memory buffer with given size.
Caller is responsible for calling <a href="xmlsec-buffer.html#XMLSECBUFFERDESTROY"><span class="TYPE">xmlSecBufferDestroy</span></a> function
to free the buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3826"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the intial size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3831"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> pointer to newly allocated buffer or NULL if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERDESTROY"></a><h3>xmlSecBufferDestroy ()</h3>
<pre class="PROGRAMLISTING"><font>void</font> xmlSecBufferDestroy (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Desrtoys buffer object created with <a href="xmlsec-buffer.html#XMLSECBUFFERCREATE"><span class="TYPE">xmlSecBufferCreate</span></a> function.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody><tr>
<td align="LEFT" valign="TOP"><a name="AEN3848"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr></tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERINITIALIZE"></a><h3>xmlSecBufferInitialize ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferInitialize (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Initializes buffer object <code class="PARAMETER">buf</code>. Caller is responsible for calling
<a href="xmlsec-buffer.html#XMLSECBUFFERFINALIZE"><span class="TYPE">xmlSecBufferFinalize</span></a> function to free allocated resources.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3867"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3872"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the initial buffer size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3877"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERFINALIZE"></a><h3>xmlSecBufferFinalize ()</h3>
<pre class="PROGRAMLISTING"><font>void</font> xmlSecBufferFinalize (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Frees allocated resource for a buffer intialized with <a href="xmlsec-buffer.html#XMLSECBUFFERINITIALIZE"><span class="TYPE">xmlSecBufferInitialize</span></a>
function.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody><tr>
<td align="LEFT" valign="TOP"><a name="AEN3894"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr></tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERGETDATA"></a><h3>xmlSecBufferGetData ()</h3>
<pre class="PROGRAMLISTING"><a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a>* xmlSecBufferGetData (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Gets pointer to buffer's data.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3909"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3914"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> pointer to buffer's data.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERSETDATA"></a><h3>xmlSecBufferSetData ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferSetData (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *data,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Sets the value of the buffer to <code class="PARAMETER">data</code>.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3932"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3937"><span style="white-space: nowrap"><code class="PARAMETER">data</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the data.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3942"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the data size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3947"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERGETSIZE"></a><h3>xmlSecBufferGetSize ()</h3>
<pre class="PROGRAMLISTING"><a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> xmlSecBufferGetSize (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Gets the current buffer data size.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3962"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3967"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the current data size.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERSETSIZE"></a><h3>xmlSecBufferSetSize ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferSetSize (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Sets new buffer data size. If necessary, buffer grows to
have at least <code class="PARAMETER">size</code> bytes.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3984"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3989"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the new data size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN3994"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERGETMAXSIZE"></a><h3>xmlSecBufferGetMaxSize ()</h3>
<pre class="PROGRAMLISTING"><a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> xmlSecBufferGetMaxSize (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Gets the maximum (allocated) buffer size.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4009"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4014"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the maximum (allocated) buffer size.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERSETMAXSIZE"></a><h3>xmlSecBufferSetMaxSize ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferSetMaxSize (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Sets new buffer maximum size. If necessary, buffer grows to
have at least <code class="PARAMETER">size</code> bytes.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4031"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4036"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the new maximum size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4041"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFEREMPTY"></a><h3>xmlSecBufferEmpty ()</h3>
<pre class="PROGRAMLISTING"><font>void</font> xmlSecBufferEmpty (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Empties the buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody><tr>
<td align="LEFT" valign="TOP"><a name="AEN4056"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr></tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERAPPEND"></a><h3>xmlSecBufferAppend ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferAppend (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *data,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Appends the <code class="PARAMETER">data</code> after the current data stored in the buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4074"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4079"><span style="white-space: nowrap"><code class="PARAMETER">data</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the data.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4084"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the data size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4089"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERPREPEND"></a><h3>xmlSecBufferPrepend ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferPrepend (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <a href="xmlsec-xmlsec.html#XMLSECBYTE">xmlSecByte</a> *data,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Prepends the <code class="PARAMETER">data</code> before the current data stored in the buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4107"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4112"><span style="white-space: nowrap"><code class="PARAMETER">data</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the data.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4117"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the data size.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4122"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERREMOVEHEAD"></a><h3>xmlSecBufferRemoveHead ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferRemoveHead (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Removes <code class="PARAMETER">size</code> bytes from the beginning of the current buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4139"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4144"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the number of bytes to be removed.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4149"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERREMOVETAIL"></a><h3>xmlSecBufferRemoveTail ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferRemoveTail (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<a href="xmlsec-xmlsec.html#XMLSECSIZE">xmlSecSize</a> size);</pre>
<p>Removes <code class="PARAMETER">size</code> bytes from the end of current buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4166"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4171"><span style="white-space: nowrap"><code class="PARAMETER">size</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the number of bytes to be removed.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4176"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERREADFILE"></a><h3>xmlSecBufferReadFile ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferReadFile (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
const <font>char</font> *filename);</pre>
<p>Reads the content of the file <code class="PARAMETER">filename</code> in the buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4193"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4198"><span style="white-space: nowrap"><code class="PARAMETER">filename</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the filename.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4203"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERBASE64NODECONTENTREAD"></a><h3>xmlSecBufferBase64NodeContentRead ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferBase64NodeContentRead (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<font>xmlNodePtr</font> node);</pre>
<p>Reads the content of the <code class="PARAMETER">node</code>, base64 decodes it and stores the
result in the buffer.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4220"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4225"><span style="white-space: nowrap"><code class="PARAMETER">node</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to node.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4230"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERBASE64NODECONTENTWRITE"></a><h3>xmlSecBufferBase64NodeContentWrite ()</h3>
<pre class="PROGRAMLISTING"><font>int</font> xmlSecBufferBase64NodeContentWrite (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf,
<font>xmlNodePtr</font> node,
<font>int</font> columns);</pre>
<p>Sets the content of the <code class="PARAMETER">node</code> to the base64 encoded buffer data.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4248"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer object.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4253"><span style="white-space: nowrap"><code class="PARAMETER">node</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to a node.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4258"><span style="white-space: nowrap"><code class="PARAMETER">columns</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the max line size fro base64 encoded data.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4263"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> 0 on success or a negative value if an error occurs.</p></td>
</tr>
</tbody></table>
</div>
<hr>
<div class="REFSECT2">
<a name="XMLSECBUFFERCREATEOUTPUTBUFFER"></a><h3>xmlSecBufferCreateOutputBuffer ()</h3>
<pre class="PROGRAMLISTING"><font>xmlOutputBufferPtr</font> xmlSecBufferCreateOutputBuffer (<a href="xmlsec-buffer.html#XMLSECBUFFER">xmlSecBufferPtr</a> buf);</pre>
<p>Creates new LibXML output buffer to store data in the <code class="PARAMETER">buf</code>. Caller is
responsible for destroying <code class="PARAMETER">buf</code> when processing is done.</p>
<p></p>
<p></p>
<table class="variablelist" border="0" cellspacing="0" cellpadding="4"><tbody>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4280"><span style="white-space: nowrap"><code class="PARAMETER">buf</code> :</span></a></td>
<td align="LEFT" valign="TOP"><p> the pointer to buffer.</p></td>
</tr>
<tr>
<td align="LEFT" valign="TOP"><a name="AEN4285"><span style="white-space: nowrap"><span class="emphasis"><i class="EMPHASIS">Returns</i></span> :</span></a></td>
<td align="LEFT" valign="TOP"><p> pointer to newly allocated output buffer or NULL if an error
occurs.</p></td>
</tr>
</tbody></table>
</div>
</div>
<table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="2"><tr valign="middle">
<td align="left"><a accesskey="p" href="xmlsec-bn.html"><b><<< bn</b></a></td>
<td align="right"><a accesskey="n" href="xmlsec-dl.html"><b>dl >>></b></a></td>
</tr></table>
</td></tr></table></td>
</tr></table></body>
</html>
|