Blockchain Commons Tags TypeScript Library - v1.0.0-alpha.13
    Preparing search index...

    Class Secret

    A secret to be split into shares.

    Index

    Methods

    • Creates a new Secret instance with the given data.

      Parameters

      • data: string | Uint8Array<ArrayBufferLike>

        The secret data to be split into shares.

      Returns Secret

      A new Secret instance.

      SSKRError if the length of the secret is less than MIN_SECRET_LEN, greater than MAX_SECRET_LEN, or not even.

    • Returns the length of the secret.

      Returns number

    • Returns true if the secret is empty.

      Returns boolean

    • Returns a reference to the secret data.

      Returns Uint8Array

    • Returns the secret data as a Uint8Array.

      Returns Uint8Array

    • Check equality with another Secret.

      Parameters

      Returns boolean