Options
All
  • Public
  • Public/Protected
  • All
Menu

Module common

Functions

Const areUint8ArraysEqual

  • areUint8ArraysEqual(first: Uint8Array, second: Uint8Array): boolean
  • Compares two Uint8Array.

    Parameters

    • first: Uint8Array

      The first array to compare.

    • second: Uint8Array

      The second array to compare.

    Returns boolean

    Boolean indicating if they are equal.

bytesToStr

  • bytesToStr(byteArray: Uint8Array): string
  • Converts a byte array into a string of characters.

    Parameters

    • byteArray: Uint8Array

      Array of bytes to convert.

    Returns string

    String output from the conversion.

Const concatUint8Array

  • concatUint8Array(first: Uint8Array, second: Uint8Array): Uint8Array
  • Concatenates two Uint8Arrays.

    Parameters

    • first: Uint8Array

      The first array to concatenate.

    • second: Uint8Array

      The second array to concatenate.

    Returns Uint8Array

    New array with both inputs concatenated.

strToBytes

  • strToBytes(str: string): Uint8Array
  • Converts a string into a byte array of characters.

    Parameters

    • str: string

      String to convert to bytes.

    Returns Uint8Array

    A byte array with the encoded data.

Generated using TypeDoc