Character set creator. Maps numeric values to strings using the character set as digits.

Hierarchy (View Summary)

Properties

MAXIMUM_STRING_LENGTH: 40

Maximum string length supported.

Constructors

Accessors

  • get characterSet(): readonly string[]
  • Get the character set.

    Returns readonly string[]

  • get characterSetSize(): number
  • Get the character set size.

    Returns number

  • get exclusionSupport(): readonly Exclusion[]
  • Get the exclusions supported by the character set.

    Returns readonly Exclusion[]

Methods

  • Get a power of 10.

    Parameters

    • power: number

      Power.

    Returns bigint

    10**power.

  • Determine the value for a string.

    Parameters

    • s: string

      String.

    • exclusion: Exclusion = Exclusion.None

      Strings excluded from the range of inputs. See Exclusion for possible values and their meaning.

    • Optionaltweak: number | bigint

      If provided, the numerical value of the string was "tweaked" using an encryption transformer.

    Returns bigint

    Numeric value of the string.

  • Get the index for a character.

    Parameters

    • c: string

      Character.

    Returns undefined | number

    Index for the character or undefined if the character is not in the character set.

  • Get the indexes for all characters in a string.

    Parameters

    • s: string

      String.

    Returns readonly (undefined | number)[]

    Array of indexes for each character or undefined if the character is not in the character set.