#crypto #encodable #decodable #fields #tlv #slice #flexiber

macro no-std flexiber_derive

Procedural macros to derive Decodable and Encodable from flexiber

1 unstable release

0.1.0 Nov 20, 2021

#7 in #encodable

Download history 34/week @ 2023-11-30 28/week @ 2023-12-07 51/week @ 2023-12-14 14/week @ 2023-12-21 7/week @ 2023-12-28 13/week @ 2024-01-04 21/week @ 2024-01-11 9/week @ 2024-01-18 10/week @ 2024-01-25 27/week @ 2024-02-01 32/week @ 2024-02-08 71/week @ 2024-02-15 57/week @ 2024-02-22 102/week @ 2024-02-29 63/week @ 2024-03-07 45/week @ 2024-03-14

285 downloads per month
Used in 5 crates (via flexiber)

Apache-2.0 OR MIT

25KB
478 lines

flexiber

Encoding and decoding of BER-TLV as described in ISO 7816-4, without allocations.

Follows the approach taken in der, and then in simple-tlv.

License

flexiber is licensed under either of Apache License, Version 2.0 or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


lib.rs:

Custom derive support for the flexiber crate

With #[tlv(slice)] set, Encodable should work for fields implementing AsRef<[u8]>, and Decodable should work for fields implementing TryFrom<[u8]>, even if the field is not Decodable or Encodable.

Dependencies

~1.5MB
~36K SLoC