@sovereignbase/cryptosuite
    Preparing search index...

    Class Identifier

    Generates, derives, and validates canonical base64url identifiers.

    Index
    • Derives a deterministic, domain-separated identifier.

      String inputs default to UTF-8 and can explicitly select base64 or base64url decoding. The same inputs and byte length produce the same identifier.

      Parameters

      • base: DeriveInput

        Base value used as the derivation salt.

      • domain: DeriveInput

        Context identifying the identifier's purpose.

      • byteLength: number

        Number of derived bytes represented by the identifier.

      Returns Promise<string>

      A canonical, unpadded base64url identifier.

    • Generates a cryptographically random identifier.

      Parameters

      • byteLength: number

        Number of random bytes represented by the identifier.

      Returns string

      A canonical, unpadded base64url identifier.

    • Checks the canonical base64url representation and decoded byte length.

      Parameters

      • value: unknown

        Candidate identifier.

      • byteLength: number

        Required decoded byte length.

      Returns value is string

      Whether the value is a canonical identifier of the required size.