aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/doc/src/asn1rt.xml
blob: 65556f3f8712689be0179631b822578c9daf6896 (plain) (blame)
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
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">

<erlref>
  <header>
    <copyright>
      <year>1997</year><year>2013</year>
      <holder>Ericsson AB. All Rights Reserved.</holder>
    </copyright>
    <legalnotice>
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
 
          http://www.apache.org/licenses/LICENSE-2.0

      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    
    </legalnotice>

    <title>asn1rt</title>
    <prepared>Kenneth Lundin</prepared>
    <responsible>Kenneth Lundin</responsible>
    <docno>1</docno>
    <approved>Kenneth Lundin</approved>
    <checked></checked>
    <date>97-10-04</date>
    <rev>A</rev>
    <file>asn1.sgml</file>
  </header>
  <module>asn1rt</module>
  <modulesummary>ASN.1 runtime support functions</modulesummary>
  <description>
    <warning>
      <p>
	All functions in this module are deprecated and will be
	removed in a future release.
      </p>
    </warning>
  </description>

  <funcs>

    <func>
      <name>decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason}</name>
      <fsummary>Decodes from Bytes into an ASN.1 value.</fsummary>
      <type>
        <v>Module = Type = atom()</v>
        <v>Value = Reason = term()</v>
        <v>Bytes = binary</v>
      </type>
      <desc>
        <p>Decodes <c>Type</c> from <c>Module</c> from the binary <c>Bytes</c>.
          Returns <c>{ok,Value}</c> if successful.</p>
	<p>Use <c>Module:decode(Type, Bytes)</c> instead of this function.</p>
      </desc>
    </func>

    <func>
      <name>encode(Module,Type,Value)-> {ok,Bytes} | {error,Reason}</name>
      <fsummary>Encodes an ASN.1 value.</fsummary>
      <type>
        <v>Module = Type = atom()</v>
        <v>Value = term()</v>
        <v>Bytes = binary</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Encodes <c>Value</c> of <c>Type</c> defined in the <c>ASN.1</c>
        module <c>Module</c>. Returns a binary if successful. To get
        as fast execution as possible, the encode function performs
        only the rudimentary test that input <c>Value</c> is a correct
        instance of <c>Type</c>. For example, the length of strings is
        not always checked.</p>
	<p>Use <c>Module:encode(Type, Value)</c> instead of this function.</p>
      </desc>
    </func>

    <func>
      <name>info(Module) ->  {ok,Info} | {error,Reason}</name>
      <fsummary>Returns compiler information about the Module.</fsummary>
      <type>
        <v>Module = atom()</v>
        <v>Info = list()</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Returns the version of the <c>ASN.1</c> compiler that was
          used to compile the module. It also returns the compiler options
          that were used.</p>
	<p>Use <c>Module:info()</c> instead of this function.</p>
      </desc>
    </func>

    <func>
      <name>utf8_binary_to_list(UTF8Binary) ->  {ok,UnicodeList} | {error,Reason}</name>
      <fsummary>Transforms an UTF8 encoded binary to a unicode list.</fsummary>
      <type>
        <v>UTF8Binary = binary()</v>
        <v>UnicodeList = [integer()]</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Transforms a UTF8 encoded binary
          to a list of integers, where each integer represents one
          character as its unicode value. The function fails if the binary
          is not a properly encoded UTF8 string.</p>
	<p>Use <seealso marker="stdlib:unicode#characters_to_list-1">unicode:characters_to_list/1</seealso> instead of this function.</p>
      </desc>
    </func>

    <func>
      <name>utf8_list_to_binary(UnicodeList) ->  {ok,UTF8Binary} | {error,Reason}</name>
      <fsummary>Transforms an unicode list to a UTF8 binary.</fsummary>
      <type>
        <v>UnicodeList = [integer()]</v>
        <v>UTF8Binary = binary()</v>
        <v>Reason = term()</v>
      </type>
      <desc>
        <p>Transforms a list of integers,
          where each integer represents one character as its unicode
          value, to a UTF8 encoded binary.</p>
	<p>Use <seealso marker="stdlib:unicode#characters_to_binary-1">unicode:characters_to_binary/1</seealso> instead of this function.</p>
      </desc>
    </func>

  </funcs>

</erlref>