source: trunk/Packages/synapse/docs/help/asn1util.html

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Základní kostra projektu.
  • Přidáno: Knihovna synapse.
File size: 11.1 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
2<html>
3<head>
4<meta name="GENERATOR" content="PasDoc 0.9.0">
5<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6<title>asn1util</title>
7<link rel="StyleSheet" type="text/css" href="pasdoc.css">
8</head>
9<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
10<h1 class="unit">Unit asn1util</h1>
11<table class="sections">
12<tr>
13<td><a class="section" href="#@Description">Description</a></td><td><a class="section" href="#@Uses">uses</a></td><td>Classes, Interfaces, Objects and Records</td><td><a class="section" href="#@FuncsProcs">Functions and Procedures</a></td><td>Types</td><td><a class="section" href="#@Constants">Constants</a></td><td>Variables</td></tr></table>
14<a name="@Description"></a><h2 class="description">Description</h2>
15<p>
16Utilities for handling ASN.1 BER encoding</p>
17<p>
18 By this unit you can parse ASN.1 BER encoded data to elements or build back any elements to ASN.1 BER encoded buffer. You can dump ASN.1 BER encoded data to human readable form for easy debugging, too.
19
20<p>Supported element types are: ASN1_BOOL, ASN1_INT, ASN1_OCTSTR, ASN1_NULL, ASN1_OBJID, ASN1_ENUM, ASN1_SEQ, ASN1_SETOF, ASN1_IPADDR, ASN1_COUNTER, ASN1_GAUGE, ASN1_TIMETICKS, ASN1_OPAQUE
21
22<p>For sample of using, look to <a class="normal" href="snmpsend.TSNMPSend.html">TSNMPSend</a> or <a class="normal" href="ldapsend.TLDAPSend.html">TLDAPSend</a>class.</p>
23<a name="@Uses"></a><h2 class="uses">uses</h2>
24<ul class="useslist"><li>SysUtils</li><li>Classes</li><li><a href="synautil.html">synautil</a></li></ul><h2 class="overview">Overview</h2>
25<a name="@FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
26<table class="summary">
27<tr class="list">
28<td class="itemcode"><code>function <b><a href="asn1util.html#ASNEncOIDItem">ASNEncOIDItem</a></b>(Value: Integer): AnsiString;</code></td>
29</tr>
30<tr class="list2">
31<td class="itemcode"><code>function <b><a href="asn1util.html#ASNDecOIDItem">ASNDecOIDItem</a></b>(var Start: Integer; const Buffer: AnsiString): Integer;</code></td>
32</tr>
33<tr class="list">
34<td class="itemcode"><code>function <b><a href="asn1util.html#ASNEncLen">ASNEncLen</a></b>(Len: Integer): AnsiString;</code></td>
35</tr>
36<tr class="list2">
37<td class="itemcode"><code>function <b><a href="asn1util.html#ASNDecLen">ASNDecLen</a></b>(var Start: Integer; const Buffer: AnsiString): Integer;</code></td>
38</tr>
39<tr class="list">
40<td class="itemcode"><code>function <b><a href="asn1util.html#ASNEncInt">ASNEncInt</a></b>(Value: Integer): AnsiString;</code></td>
41</tr>
42<tr class="list2">
43<td class="itemcode"><code>function <b><a href="asn1util.html#ASNEncUInt">ASNEncUInt</a></b>(Value: Integer): AnsiString;</code></td>
44</tr>
45<tr class="list">
46<td class="itemcode"><code>function <b><a href="asn1util.html#ASNObject">ASNObject</a></b>(const Data: AnsiString; ASNType: Integer): AnsiString;</code></td>
47</tr>
48<tr class="list2">
49<td class="itemcode"><code>function <b><a href="asn1util.html#ASNItem">ASNItem</a></b>(var Start: Integer; const Buffer: AnsiString; var ValueType: Integer): AnsiString;</code></td>
50</tr>
51<tr class="list">
52<td class="itemcode"><code>function <b><a href="asn1util.html#MibToId">MibToId</a></b>(Mib: String): AnsiString;</code></td>
53</tr>
54<tr class="list2">
55<td class="itemcode"><code>function <b><a href="asn1util.html#IdToMib">IdToMib</a></b>(const Id: AnsiString): String;</code></td>
56</tr>
57<tr class="list">
58<td class="itemcode"><code>function <b><a href="asn1util.html#IntMibToStr">IntMibToStr</a></b>(const Value: AnsiString): AnsiString;</code></td>
59</tr>
60<tr class="list2">
61<td class="itemcode"><code>function <b><a href="asn1util.html#ASNdump">ASNdump</a></b>(const Value: AnsiString): AnsiString;</code></td>
62</tr>
63</table>
64<a name="@Constants"></a><h3 class="summary">Constants</h3>
65<table class="summary">
66<tr class="list">
67<td class="itemcode"><code><b><a href="asn1util.html#ASN1_BOOL">ASN1_BOOL</a></b> = $01;</code></td>
68</tr>
69<tr class="list2">
70<td class="itemcode"><code><b><a href="asn1util.html#ASN1_INT">ASN1_INT</a></b> = $02;</code></td>
71</tr>
72<tr class="list">
73<td class="itemcode"><code><b><a href="asn1util.html#ASN1_OCTSTR">ASN1_OCTSTR</a></b> = $04;</code></td>
74</tr>
75<tr class="list2">
76<td class="itemcode"><code><b><a href="asn1util.html#ASN1_NULL">ASN1_NULL</a></b> = $05;</code></td>
77</tr>
78<tr class="list">
79<td class="itemcode"><code><b><a href="asn1util.html#ASN1_OBJID">ASN1_OBJID</a></b> = $06;</code></td>
80</tr>
81<tr class="list2">
82<td class="itemcode"><code><b><a href="asn1util.html#ASN1_ENUM">ASN1_ENUM</a></b> = $0a;</code></td>
83</tr>
84<tr class="list">
85<td class="itemcode"><code><b><a href="asn1util.html#ASN1_SEQ">ASN1_SEQ</a></b> = $30;</code></td>
86</tr>
87<tr class="list2">
88<td class="itemcode"><code><b><a href="asn1util.html#ASN1_SETOF">ASN1_SETOF</a></b> = $31;</code></td>
89</tr>
90<tr class="list">
91<td class="itemcode"><code><b><a href="asn1util.html#ASN1_IPADDR">ASN1_IPADDR</a></b> = $40;</code></td>
92</tr>
93<tr class="list2">
94<td class="itemcode"><code><b><a href="asn1util.html#ASN1_COUNTER">ASN1_COUNTER</a></b> = $41;</code></td>
95</tr>
96<tr class="list">
97<td class="itemcode"><code><b><a href="asn1util.html#ASN1_GAUGE">ASN1_GAUGE</a></b> = $42;</code></td>
98</tr>
99<tr class="list2">
100<td class="itemcode"><code><b><a href="asn1util.html#ASN1_TIMETICKS">ASN1_TIMETICKS</a></b> = $43;</code></td>
101</tr>
102<tr class="list">
103<td class="itemcode"><code><b><a href="asn1util.html#ASN1_OPAQUE">ASN1_OPAQUE</a></b> = $44;</code></td>
104</tr>
105</table>
106<h2 class="description">Description</h2>
107<h3 class="detail">Functions and Procedures</h3>
108<table class="detail">
109<tr class="list">
110<td class="itemcode"><a name="ASNEncOIDItem"></a><code>function <b>ASNEncOIDItem</b>(Value: Integer): AnsiString;</code></td>
111</tr>
112</table>
113<p>
114Encodes OID item to binary form.</p>
115<table class="detail">
116<tr class="list">
117<td class="itemcode"><a name="ASNDecOIDItem"></a><code>function <b>ASNDecOIDItem</b>(var Start: Integer; const Buffer: AnsiString): Integer;</code></td>
118</tr>
119</table>
120<p>
121Decodes an OID item of the next element in the &quot;Buffer&quot; from the &quot;Start&quot; position.</p>
122<table class="detail">
123<tr class="list">
124<td class="itemcode"><a name="ASNEncLen"></a><code>function <b>ASNEncLen</b>(Len: Integer): AnsiString;</code></td>
125</tr>
126</table>
127<p>
128Encodes the length of ASN.1 element to binary.</p>
129<table class="detail">
130<tr class="list">
131<td class="itemcode"><a name="ASNDecLen"></a><code>function <b>ASNDecLen</b>(var Start: Integer; const Buffer: AnsiString): Integer;</code></td>
132</tr>
133</table>
134<p>
135Decodes length of next element in &quot;Buffer&quot; from the &quot;Start&quot; position.</p>
136<table class="detail">
137<tr class="list">
138<td class="itemcode"><a name="ASNEncInt"></a><code>function <b>ASNEncInt</b>(Value: Integer): AnsiString;</code></td>
139</tr>
140</table>
141<p>
142Encodes a signed integer to ASN.1 binary</p>
143<table class="detail">
144<tr class="list">
145<td class="itemcode"><a name="ASNEncUInt"></a><code>function <b>ASNEncUInt</b>(Value: Integer): AnsiString;</code></td>
146</tr>
147</table>
148<p>
149Encodes unsigned integer into ASN.1 binary</p>
150<table class="detail">
151<tr class="list">
152<td class="itemcode"><a name="ASNObject"></a><code>function <b>ASNObject</b>(const Data: AnsiString; ASNType: Integer): AnsiString;</code></td>
153</tr>
154</table>
155<p>
156Encodes ASN.1 object to binary form.</p>
157<table class="detail">
158<tr class="list">
159<td class="itemcode"><a name="ASNItem"></a><code>function <b>ASNItem</b>(var Start: Integer; const Buffer: AnsiString; var ValueType: Integer): AnsiString;</code></td>
160</tr>
161</table>
162<p>
163Beginning with the &quot;Start&quot; position, decode the ASN.1 item of the next element in &quot;Buffer&quot;. Type of item is stored in &quot;ValueType.&quot;</p>
164<table class="detail">
165<tr class="list">
166<td class="itemcode"><a name="MibToId"></a><code>function <b>MibToId</b>(Mib: String): AnsiString;</code></td>
167</tr>
168</table>
169<p>
170Encodes an MIB OID string to binary form.</p>
171<table class="detail">
172<tr class="list">
173<td class="itemcode"><a name="IdToMib"></a><code>function <b>IdToMib</b>(const Id: AnsiString): String;</code></td>
174</tr>
175</table>
176<p>
177Decodes MIB OID from binary form to string form.</p>
178<table class="detail">
179<tr class="list">
180<td class="itemcode"><a name="IntMibToStr"></a><code>function <b>IntMibToStr</b>(const Value: AnsiString): AnsiString;</code></td>
181</tr>
182</table>
183<p>
184Encodes an one number from MIB OID to binary form. (used internally from <a class="normal" href="asn1util.html#MibToId">MibToId</a>)</p>
185<table class="detail">
186<tr class="list">
187<td class="itemcode"><a name="ASNdump"></a><code>function <b>ASNdump</b>(const Value: AnsiString): AnsiString;</code></td>
188</tr>
189</table>
190<p>
191Convert ASN.1 BER encoded buffer to human readable form for debugging.</p>
192<h3 class="detail">Constants</h3>
193<table class="detail">
194<tr class="list">
195<td class="itemcode"><a name="ASN1_BOOL"></a><code><b>ASN1_BOOL</b> = $01;</code></td>
196</tr>
197</table>
198&nbsp;<table class="detail">
199<tr class="list">
200<td class="itemcode"><a name="ASN1_INT"></a><code><b>ASN1_INT</b> = $02;</code></td>
201</tr>
202</table>
203&nbsp;<table class="detail">
204<tr class="list">
205<td class="itemcode"><a name="ASN1_OCTSTR"></a><code><b>ASN1_OCTSTR</b> = $04;</code></td>
206</tr>
207</table>
208&nbsp;<table class="detail">
209<tr class="list">
210<td class="itemcode"><a name="ASN1_NULL"></a><code><b>ASN1_NULL</b> = $05;</code></td>
211</tr>
212</table>
213&nbsp;<table class="detail">
214<tr class="list">
215<td class="itemcode"><a name="ASN1_OBJID"></a><code><b>ASN1_OBJID</b> = $06;</code></td>
216</tr>
217</table>
218&nbsp;<table class="detail">
219<tr class="list">
220<td class="itemcode"><a name="ASN1_ENUM"></a><code><b>ASN1_ENUM</b> = $0a;</code></td>
221</tr>
222</table>
223&nbsp;<table class="detail">
224<tr class="list">
225<td class="itemcode"><a name="ASN1_SEQ"></a><code><b>ASN1_SEQ</b> = $30;</code></td>
226</tr>
227</table>
228&nbsp;<table class="detail">
229<tr class="list">
230<td class="itemcode"><a name="ASN1_SETOF"></a><code><b>ASN1_SETOF</b> = $31;</code></td>
231</tr>
232</table>
233&nbsp;<table class="detail">
234<tr class="list">
235<td class="itemcode"><a name="ASN1_IPADDR"></a><code><b>ASN1_IPADDR</b> = $40;</code></td>
236</tr>
237</table>
238&nbsp;<table class="detail">
239<tr class="list">
240<td class="itemcode"><a name="ASN1_COUNTER"></a><code><b>ASN1_COUNTER</b> = $41;</code></td>
241</tr>
242</table>
243&nbsp;<table class="detail">
244<tr class="list">
245<td class="itemcode"><a name="ASN1_GAUGE"></a><code><b>ASN1_GAUGE</b> = $42;</code></td>
246</tr>
247</table>
248&nbsp;<table class="detail">
249<tr class="list">
250<td class="itemcode"><a name="ASN1_TIMETICKS"></a><code><b>ASN1_TIMETICKS</b> = $43;</code></td>
251</tr>
252</table>
253&nbsp;<table class="detail">
254<tr class="list">
255<td class="itemcode"><a name="ASN1_OPAQUE"></a><code><b>ASN1_OPAQUE</b> = $44;</code></td>
256</tr>
257</table>
258&nbsp;<hr noshade size="1"><span class="appinfo"><em>Generated by <a target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.9.0</a> on 2012-04-23 21:38:50</em>
259</span>
260</body></html>
Note: See TracBrowser for help on using the repository browser.