[][src]Struct lib_bn::arith::U512

#[repr(C)]
pub struct U512(pub [u128; 4]);

512-bit, stack allocated biginteger for use in extension field serialization and scalar interpretation.

Methods

impl U512[src]

pub fn new(c1: &U256, c0: &U256, modulo: &U256) -> U512[src]

Multiplies c1 by modulo, adds c0.

pub fn from_slice(s: &[u8]) -> Result<U512, Error>[src]

pub fn random<R: Rng>(rng: &mut R) -> U512[src]

Get a random U512

pub fn get_bit(&self, n: usize) -> Option<bool>[src]

pub fn divrem(&self, modulo: &U256) -> (Option<U256>, U256)[src]

Divides self by modulo, returning remainder and, if possible, a quotient smaller than the modulus.

pub fn interpret(buf: &[u8; 64]) -> U512[src]

Trait Implementations

impl Copy for U512[src]

impl PartialEq<U512> for U512[src]

impl From<[u64; 8]> for U512[src]

impl Clone for U512[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for U512[src]

impl Debug for U512[src]

impl Encodable for U512[src]

impl Decodable for U512[src]

Auto Trait Implementations

impl Send for U512

impl Sync for U512

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.