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.
encode(Module,{Type,Value})-> {ok,Bytes}| {error,Reason}
encode(Module,Type,Value)-> {ok,Bytes} | {error,Reason}
Module = Type = atom()Value = term()Bytes = [Int] when integer(Int), Int >= 0, Int =< 255Reason = term()Encodes Value of Type defined in the ASN.1 module
Module. Returns a list of bytes 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.
decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason}
Module = Type = atom()Value = Reason = term()Bytes = [Int] when integer(Int), Int >= 0, Int =< 255Decodes Type from Module from the list of bytes
Bytes. Returns {ok,Value} if successful.
validate(Module,{Type,Value}) -> ok | {error,Reason}
validate(Module,Type,Value) -> ok | {error,Reason}
Module = Type = atom()Value = term()Validates that Value conforms to Type
from Module. Not implemented in this version of the
ASN.1 application.