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

This module contains logic to convert an integer encoded by 243 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 t243, where t243 is used analogous to i64 or u64. If the latter are 64-bit signed/unsigned integer types, then t243 is a 243-trit integer type. Analogous to fanning out a u64 into 64 individual bits, t243 is fanned out into 243 trits, each (rather inefficiently) represented by one u8.

Structs

BTRIT_0

T243 balanced trits represented 0.

BTRIT_1

T243 balanced trits represented 1.

BTRIT_NEG_1

T243 balanced trits represented -1.

T243

Fixed size trit buffer.

UTRIT_0

T243 unbalanced trits represented 0.

UTRIT_1

T243 unbalanced trits represented 1.

UTRIT_2

T243 unbalanced trits represented 2.

UTRIT_U384_MAX

T243 unbalanced trits represented U384::max.

UTRIT_U384_MAX_HALF

T243 unbalanced trits represented half of U384::max.

Constants

LENGTH

Length of the trit buffer.