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

    Class Nonce

    Implements

    • CborTaggedEncodable
    • CborTaggedDecodable<Nonce>
    • UREncodable
    Index

    Properties

    NONCE_SIZE: 12 = SYMMETRIC_NONCE_SIZE

    Methods

    • Create a new nonce from the given hexadecimal string.

      Parameters

      • hex: string

      Returns Nonce

      Error if the string is not exactly 24 hexadecimal digits.

    • Generate a random nonce using provided RNG.

      Parameters

      • rng: SecureRandomNumberGenerator

      Returns Nonce

    • Returns the CBOR tags associated with Nonce.

      Returns Tag[]

    • Returns the untagged CBOR encoding (as a byte string).

      Returns Cbor

    • Returns the tagged CBOR encoding.

      Returns Cbor

    • Returns the tagged value in CBOR binary representation.

      Returns Uint8Array

    • Creates a Nonce by decoding it from untagged CBOR.

      Parameters

      • cbor: Cbor

      Returns Nonce

    • Creates a Nonce by decoding it from tagged CBOR.

      Parameters

      • cbor: Cbor

      Returns Nonce

    • Returns the UR representation of the Nonce. Note: URs use untagged CBOR since the type is conveyed by the UR type itself.

      Returns UR

    • Returns the UR string representation.

      Returns string