[][src]Module bee_crypto::ternary::bigint::t242

This module contains logic to convert an integer encoded by 242 trits to the same integer encoded by 384 bits (or 48 signed bytes, i8).

At the core of this a slice of binary-coded, balanced trits is interpreted fanned-out t242, where t242 is used analogous to i64 or u64. If the latter are 64-bit signed/unsigned integer types, then t242 is a 242-trit integer type. Analogous to fanning out a u64 into 64 individual bits, t242 is fanned out into 242 trits, each (rather inefficiently) represented by one u8.

Structs

BTRIT_0

T242 balanced trits represented 0.

BTRIT_1

T242 balanced trits represented 1.

BTRIT_MAX

T242 balanced trits represented maximum value.

BTRIT_MIN

T242 balanced trits represented minimum value.

BTRIT_NEG_1

T242 balanced trits represented -1.

T242

Fixed size trit buffer.

UTRIT_0

T242 unbalanced trits represented 0.

UTRIT_1

T242 unbalanced trits represented 1.

UTRIT_2

T242 unbalanced trits represented 2.

UTRIT_U384_MAX

T242 unbalanced trits represented U384::max.

UTRIT_U384_MAX_HALF

T242 unbalanced trits represented half of U384::max.

Constants

LENGTH

Length of the trit buffer.