Function bsn1::contents::to_integer_unchecked [−][src]
Expand description
Parses bytes as a contents of Integer without any sanitization.
Type T should be the builtin primitive integer types (e.g., u8, u32, isize, i128, …)
This function is common for BER, DER, and CER.
Wargnings
This function assumes that the CPU adopts 2’s complement to represent negative value.
Safety
The behavior is undefined in the following cases.
bytesis not formatted as the contents of ANS.1 integer.- The result is too large or too small to be represented by type
T.