Expand description
§def_oid
This crate provides two procedural macros.
Both macros is used to declare fixed size array of u8.
The array will contains OID encoded according to ASN1 encoding scheme.
See X.690 for more detail.
Two usable macros are:
- const_oid! - This macro can be used to declare constant variable. Since Rust required
that all constant must have explicit type declared and OID size required some calculation,
this macro do all that. For example, OID of
2.5.4.3is[u8; 3]while1.1.3.4.5555is[u8; 5]. See const_oid! for how to use it. - oid! - This macro can be used to declare any variable. It will return fixed size array
of
u8.
Macros§
- const_
oid - This macro is used to declare an OID (Object-Identifier) constant variable. It will automatically convert OID string into bytes array that conform to ASN1 OID encoding according to X.690 standard.
- oid
- This macro is used to define an OID (Object-Identifier). It will automatically convert OID string into bytes array that conform to ASN1 OID encoding according to X.690 standard.