pub enum Bech32Large {}Expand description
Custom Bech32 (BIP-173) checksum variant with an extended payload capacity.
Matches classic Bech32 checksum behavior but raises the CODE_LENGTH limit to
8191 Fe32 values (~5 KB (5,115 bytes maximum payload)), well above the standard 90-character limit.
Used by the ToBech32 trait to support large secrets while preserving full
checksum validation.
Most users interact with this type indirectly via ToBech32. It is pub
for use in impl Checksum and for advanced callers who construct their own
encode_lower::<Bech32Large>(...) calls.
Trait Implementations§
Source§impl Checksum for Bech32Large
Available on crate feature encoding-bech32 only.
impl Checksum for Bech32Large
Available on crate feature
encoding-bech32 only.Source§const CODE_LENGTH: usize = 8191
const CODE_LENGTH: usize = 8191
The length of the code. Read more
Source§const CHECKSUM_LENGTH: usize = 6
const CHECKSUM_LENGTH: usize = 6
The number of characters in the checksum. Read more
Source§const GENERATOR_SH: [u32; 5]
const GENERATOR_SH: [u32; 5]
The coefficients of the generator polynomial, except the leading monic term,
in “big-endian” (highest-degree coefficients get leftmost bits) order, along
with the 4 shifts of the generator. Read more
Source§const TARGET_RESIDUE: u32 = 1
const TARGET_RESIDUE: u32 = 1
The residue, modulo the generator polynomial, that a valid codeword will have.
Source§type MidstateRepr = u32
type MidstateRepr = u32
An unsigned integer type capable of holding a packed version of the generator
polynomial (without its leading 1) and target residue (which will have the
same width). Read more
Source§fn sanity_check()
fn sanity_check()
Sanity checks that the various constants of the trait are set in a way that they
are consistent with each other. Read more
Source§impl Clone for Bech32Large
impl Clone for Bech32Large
Source§fn clone(&self) -> Bech32Large
fn clone(&self) -> Bech32Large
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Hash for Bech32Large
impl Hash for Bech32Large
Source§impl Ord for Bech32Large
impl Ord for Bech32Large
Source§fn cmp(&self, other: &Bech32Large) -> Ordering
fn cmp(&self, other: &Bech32Large) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Bech32Large
impl PartialEq for Bech32Large
Source§impl PartialOrd for Bech32Large
impl PartialOrd for Bech32Large
impl Copy for Bech32Large
impl Eq for Bech32Large
impl StructuralPartialEq for Bech32Large
Auto Trait Implementations§
impl Freeze for Bech32Large
impl RefUnwindSafe for Bech32Large
impl Send for Bech32Large
impl Sync for Bech32Large
impl Unpin for Bech32Large
impl UnsafeUnpin for Bech32Large
impl UnwindSafe for Bech32Large
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more