Struct der::BigUInt [−][src]
big-uint only.Expand description
“Big” unsigned ASN.1 INTEGER type.
Provides direct access to the underlying big endian bytes which comprise an unsigned integer value.
Intended for use cases like very large integers that are used in cryptographic applications (e.g. keys, signatures).
Generic over a Size value (e.g. der::consts::U64),
indicating the size of an integer in bytes.
Currently supported sizes are 1 - 512 bytes.
Implementations
impl<'a, N> BigUInt<'a, N> where
N: Unsigned + NonZero, [src]
impl<'a, N> BigUInt<'a, N> where
N: Unsigned + NonZero, [src]pub fn new(bytes: &'a [u8]) -> Result<Self>[src]
pub fn new(bytes: &'a [u8]) -> Result<Self>[src]Create a new BigUInt from a byte slice.
Slice may be less than or equal to N bytes.
Trait Implementations
impl<'a, N> Encodable for BigUInt<'a, N> where
N: Unsigned + NonZero, [src]
impl<'a, N> Encodable for BigUInt<'a, N> where
N: Unsigned + NonZero, [src]fn encoded_len(&self) -> Result<Length>[src]
fn encoded_len(&self) -> Result<Length>[src]Compute the length of this value in bytes when encoded as ASN.1 DER.
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]
fn encode(&self, encoder: &mut Encoder<'_>) -> Result<()>[src]Encode this value as ASN.1 DER using the provided Encoder.
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]
fn encode_to_slice<'a>(&self, buf: &'a mut [u8]) -> Result<&'a [u8]>[src]Encode this value to the provided byte slice, returning a sub-slice containing the encoded message. Read more
impl<'a, N: PartialOrd + Unsigned + NonZero> PartialOrd<BigUInt<'a, N>> for BigUInt<'a, N>[src]
impl<'a, N: PartialOrd + Unsigned + NonZero> PartialOrd<BigUInt<'a, N>> for BigUInt<'a, N>[src]fn partial_cmp(&self, other: &BigUInt<'a, N>) -> Option<Ordering>[src]
fn partial_cmp(&self, other: &BigUInt<'a, N>) -> Option<Ordering>[src]This method returns an ordering between self and other values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than (for self and other) and is used by the < operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool1.0.0[src]This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl<'a, N: Copy + Unsigned + NonZero> Copy for BigUInt<'a, N>[src]
impl<'a, N: Eq + Unsigned + NonZero> Eq for BigUInt<'a, N>[src]
impl<'a, N: Unsigned + NonZero> StructuralEq for BigUInt<'a, N>[src]
impl<'a, N: Unsigned + NonZero> StructuralPartialEq for BigUInt<'a, N>[src]
Auto Trait Implementations
impl<'a, N> RefUnwindSafe for BigUInt<'a, N> where
N: RefUnwindSafe,
N: RefUnwindSafe,
impl<'a, N> Send for BigUInt<'a, N> where
N: Send,
N: Send,
impl<'a, N> Sync for BigUInt<'a, N> where
N: Sync,
N: Sync,
impl<'a, N> Unpin for BigUInt<'a, N> where
N: Unpin,
N: Unpin,
impl<'a, N> UnwindSafe for BigUInt<'a, N> where
N: UnwindSafe,
N: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, [src]type Owned = T
type Owned = TThe resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn to_owned(&self) -> T[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)[src]
pub fn clone_into(&self, target: &mut T)[src]🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more