Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ElementModP

General-purpose holder of elements in [0, P). The constructor and concrete type are not exposed. Instead use the helper functions, like {@link GroupContext[createElementModP]}, which will check for errors.

Hierarchy

Index

Properties

cryptoHashString: string

Accessors

Methods

  • isInBounds(): boolean
  • Validate that the element is actually within the bounds of [0,max). Returns true if all is good, false if something's wrong.

    Returns boolean

  • isInBoundsNoZero(): boolean
  • isValidResidue(): boolean
  • Validate that this element is in the subgroup reachable from the generator.

    Returns boolean

  • isZero(): boolean
  • toBigint(): bigint
  • toBytes(): Uint8Array
  • toHex(): string
  • toString(): string

Generated using TypeDoc