crypto_bigint/int/encoding.rs
1//! Const-friendly decoding/encoding operations for [`Int`].
2
3use crate::{Int, Uint};
4
5impl<const LIMBS: usize> Int<LIMBS> {
6 /// Create a new [`Int`] from the provided big endian hex string.
7 ///
8 /// Panics if the hex is malformed or not zero-padded accordingly for the size.
9 ///
10 /// See [`Uint::from_be_hex`] for more details.
11 pub const fn from_be_hex(hex: &str) -> Self {
12 Self(Uint::from_be_hex(hex))
13 }
14}