(asn.1) - Abstract Syntas Notation One library

This section describes (asn.1) library. The library supports DER and BER formats. We do not describe DER or BER format here.

Library (asn.1)

Top most library of asn.1 procedure collection libraries. There are multiple of related libraries, however we do not mention those because it might be changed in future. So do not use the child libraries directly, use this.

High level user APIs

obj must be asn.1-object which described below sections.

If you specify keyword argument encoder, it must be generic function which accepts an object and a binary output port respectively.

Encodes given obj to bytevector. If obj contains BER object, the procedure encodes it to BER. This might be changed in future to configure which format this should encode.

If you want to encode to other format such as CER or XER, then you need to implement an encoder. This procedure does not check given arguments type, just pass obj to encoder with binary output port.

in must be binary input port.

Reads asn.1-object from given port. The port must be DER or BER encoded stream otherwise it raises &assertion

Middle level user APIs

This section is incompleted.

Creates a DER application specific object.

Creates a DER bit string object.

Creates a DER bmp string object.

Creates a DER octet string object.

Creates a DER general string object.

Creates a DER IA5 string object.

Creates a DER numeric string object.

Creates a DER printable string object.

Creates a DER T61 string object.

Creates a DER universal string object.

Creates a DER UTF8 string object.

Creates a DER visible string object.

Creates a DER boolean object.

Creates a DER enumerated object.

Creates a DER integer object.

Creates a DER OID object.

Creates a DER sequence object.

If the third form is used, _o_s must be list of <der-encodable>.

Creates a DER set object.

If the third form is used, _o_s must be list of <der-encodable>.

Creates a DER null object.

Creates a DER generalized time object.

Creates a DER UTC time object.

Creates a DER tagged object.

Creates a DER external object.

Creates a BER constructed object.

Creates a BER application specific object.

Creates a BER tagged object.

Creates a BER sequence object.

_l_s must be list of <der-encodable>.

Creates a BER set object.

_l_s must be list of <der-encodable>.

Creates a BER null object.

Low level User APIs

This section is incompleted. Here must desribe classes defined in (asn.1)library.