pub struct Key128(pub [U8; 16]);
Expand description

Fixed length byte array.

Tuple Fields

0: [U8; 16]

Implementations

Read hex string to Bytes.

Warning: declassifies secret integer types.

Create an array from a regular Rust array.

Examples
use hacspec_lib::prelude::*;

bytes!(Block, 5);
let b = Block::from_public_array([1, 2, 3, 4, 5]);

Trait Implementations

Warning: wraps on overflow.

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the & operator.

Performs the & operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Warning: declassifies secret integer types.

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

Performs the mutable indexing (container[index]) operation. Read more

(self - rhs) % n.

(self + rhs) % n

(self * rhs) % n

(self ^ exp) % n

self % n

|self| (coefficient-wise)

self % n that always returns a positive integer

Warning: wraps on overflow.

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

Return largest value that can be represented.

self ^ exp where exp is a u32.

self ^ exp where exp is a Self.

Division.

Invert self modulo n.

Warning: panics on division by 0.

The resulting type after applying the % operator.

Performs the % operation. Read more

Update this sequence with l elements of v, starting at start_in, at start_out. Read more

This function is within the hacspec subset of Rust: its signature and body use only hacspec constructs and call functions whose signatures are in hacspec. Update this sequence with v starting at start. Read more

This function is within the hacspec subset of Rust: its signature and body use only hacspec constructs and call functions whose signatures are in hacspec. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

Warning: wraps on underflow.

The resulting type after applying the - operator.

Performs the - operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.