asn1-0.3.1 has been yanked.
rust-asn1
This is a Rust library for parsing and generating ASN.1 data (DER only).
Installation
Add asn1 to the [dependencies] section of your Cargo.toml:
[]
= "0.3"
Builds on Rust 1.41.0 and newer. However Implicit and Explicit require const generics, which require Rust 1.51.0 or greater and specifying the const-generics feature.
rust-asn1 is compatible with #![no_std] environments:
= { = "0.3", = false }
Usage
To parse a structure like:
Signature ::= SEQUENCE {
r INTEGER,
s INTEGER
}
you would write:
let result = parse;
match result
And to write that structure, you would do:
let result = write;