[][src]Crate asn1_der

This library helps you to DER-en-/-decode various types. It provides some traits to convert between encoded data, DER-objects and native types as well as some trait-implementations for common types. There is also a macro (asn1_der_impl!) that helps you to implement the traits for your structs.

The following types have built-in support:

  • DerObject: A generic DER-object-wrapper that can hold any DER-object
  • (): The ASN.1-NULL-type
  • bool: The ASN.1-BOOLEAN-type
  • Vec<u8>: The ASN.1-OctetString-type
  • String: The ASN.1-UTF8String-type
  • u64: The ASN.1-INTEGER-type (within 0..u64::MAX)
  • Vec<DerObject>: The ASN.1-SEQUENCE-type
  • Vec<T>: The ASN.1-SEQUENCE-type for sequences that contain only one type T (e.g. Vec<String> for a sequence that contains only UTF8Strings)

Re-exports

pub use traits::IntoDerObject;
pub use traits::FromDerObject;
pub use traits::FromDerEncoded;
pub use traits::IntoDerEncoded;
pub use der::DerObject;

Modules

der

Contains a generic ASN.1-DER-object-implementation

traits

Contains various DER-conversion-traits

type_impls

Contains DER-conversion-trait implementations for some native types

Macros

asn1_der_impl

This macro helps you to implement the DER-conversion-traits on your own structs

Structs

Error

A typed-error that contains the error-kind, description, the position (file, line) and an optional sub-error

Enums

Asn1DerError

Functions

be_decode

Decodes a big-endian-encoded unsigned integer

be_encode

Encodes an unsigned integer using big-endian

Type Definitions

Result