Skip to content

Commit

Permalink
Merge pull request #95 from geonnave/92-improve-parsing-robustness
Browse files Browse the repository at this point in the history
Improve parsing robustness
  • Loading branch information
geonnave authored Sep 18, 2023
2 parents c40bd2d + 814fef6 commit 26b87a1
Show file tree
Hide file tree
Showing 3 changed files with 583 additions and 259 deletions.
4 changes: 4 additions & 0 deletions consts/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@ mod common {
pub const CBOR_UINT_1BYTE: u8 = 0x18u8;
pub const CBOR_NEG_INT_1BYTE_START: u8 = 0x20u8;
pub const CBOR_NEG_INT_1BYTE_END: u8 = 0x37u8;
pub const CBOR_UINT_1BYTE_START: u8 = 0x0u8;
pub const CBOR_UINT_1BYTE_END: u8 = 0x17u8;
pub const CBOR_MAJOR_TEXT_STRING: u8 = 0x60u8;
pub const CBOR_MAJOR_BYTE_STRING: u8 = 0x40u8;
pub const CBOR_MAJOR_BYTE_STRING_MAX: u8 = 0x57u8;
pub const CBOR_MAJOR_ARRAY: u8 = 0x80u8;
pub const CBOR_MAJOR_ARRAY_MAX: u8 = 0x97u8;
pub const MAX_INFO_LEN: usize = 2 + SHA256_DIGEST_LEN + // 32-byte digest as bstr
1 + MAX_KDF_LABEL_LEN + // label <24 bytes as tstr
1 + MAX_KDF_CONTEXT_LEN + // context <24 bytes as bstr
Expand Down
Loading

0 comments on commit 26b87a1

Please sign in to comment.