19972013 Ericsson AB. All Rights Reserved. The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. asn1rt Kenneth Lundin Kenneth Lundin 1 Kenneth Lundin 97-10-04 A asn1.sgml
asn1rt ASN.1 runtime support functions

All functions in this module are deprecated and will be removed in a future release.

decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason} Decode from bytes into an ASN.1 value. Module = Type = atom() Value = Reason = term() Bytes = binary

Decodes Type from Module from the binary Bytes. Returns {ok,Value} if successful.

Use Module:decode(Type, Bytes) instead of this function.

encode(Module,Type,Value)-> {ok,Bytes} | {error,Reason} Encode an ASN.1 value. Module = Type = atom() Value = term() Bytes = binary Reason = term()

Encodes Value of Type defined in the ASN.1 module Module. Returns a binary if successful. 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.

Use Module:encode(Type, Value) instead of this function.

info(Module) -> {ok,Info} | {error,Reason} Returns compiler information about the Module. 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.

Use Module:info() instead of this function.

utf8_binary_to_list(UTF8Binary) -> {ok,UnicodeList} | {error,Reason} Transforms an utf8 encoded binary to a unicode list. 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.

Use unicode:characters_to_list/1 instead of this function.

utf8_list_to_binary(UnicodeList) -> {ok,UTF8Binary} | {error,Reason} Transforms an unicode list ot an utf8 binary. 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.

Use unicode:characters_to_binary/1 instead of this function.