table of contents
other versions
- wheezy 1:15.b.1-dfsg-4+deb7u1
- wheezy-backports 1:17.3-dfsg-4~bpo70+1
- jessie 1:17.3-dfsg-4+deb8u1
- jessie-backports 1:19.2.1+dfsg-2~bpo8+1
- testing 1:19.2.1+dfsg-2
- unstable 1:19.2.1+dfsg-2
- experimental 1:19.3.1+dfsg-1
asn1rt(3erl) | Erlang Module Definition | asn1rt(3erl) |
NAME¶
asn1rt - ASN.1 runtime support functionsDESCRIPTION¶
This module is the interface module for the ASN.1 runtime support functions. To encode and decode ASN.1 types in runtime the functions in this module should be used.EXPORTS¶
decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason}
Types:
Module = Type = atom()
Value = Reason = term()
Bytes = binary | [Int] when integer(Int), Int >= 0, Int =< 255 | binary
Decodes Type from Module from the list of bytes or binary
Bytes. If the module is compiled with ber_bin or per_bin
option Bytes must be a binary. Returns {ok,Value} if
successful.
Types:
Module = Type = atom()
Value = term()
BinOrList = Bytes | binary()
Bytes = [Int|binary|Bytes] when integer(Int), Int >= 0, Int =< 255
Reason = term()
Encodes Value of Type defined in the ASN.1 module Module.
Returns a possibly nested list of bytes and or binaries if successful. If
Module was compiled with the options per_bin and optimize
the result is a binary. To get as fast execution as possible the encode
function only performs rudimentary tests that the input Value is a
correct instance of Type. The length of strings is for example not
always checked.
Types:
Module = atom()
Info = list()
Reason = term()
info/1 returns the version of the asn1 compiler that was used to compile
the module. It also returns the compiler options that was used.
Types:
Reason = term()
This function is obsolete and will be removed in R16A
Types:
Reason = term()
This function is obsolete and will be removed in R16A
Types:
UTF8Binary = binary()
UnicodeList = [integer()]
Reason = term()
utf8_binary_to_list/1 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.
Types:
UnicodeList = [integer()]
UTF8Binary = binary()
Reason = term()
utf8_list_to_binary/1 Transforms a list of integers, where each integer
represents one character as its unicode value, to a UTF8 encoded binary.
asn1 1.7 | Ericsson AB |