Function yasna::decode_der
source · pub fn decode_der<T: BERDecodable>(src: &[u8]) -> ASN1Result<T>
Expand description
Reads an ASN.1 value from &[u8]
.
If you want to decode BER-encoded data in general,
use decode_ber
.
§Examples
use yasna;
let asn : i64 = yasna::decode_der(&[2, 3, 0, 255, 255]).unwrap();
assert_eq!(asn, 65535);