rust-asn1

.. image:: https://travis-ci.org/alex/rust-asn1.svg?branch=master :target: https://travis-ci.org/alex/rust-asn1

This is a Rust library for serializing ASN.1 structures (DER only).

Usage

To write a structure like::

Signature ::= SEQUENCE {
    r INTEGER,
    s INTEGER
}

you would write:

.. code-block:: rust

use asn1::{Serializer}

let mut s = Serializer::new(writer); s.writesequence(|news| { news.writeint(r); news.writeint(s); });