UMIS SDK
    Preparing search index...

    Function randomStatusIndex

    • Picks a free index in a status list of size entries, uniformly and unpredictably, so that the position of a credential says nothing about when it was issued or to whom. isUsed tells whether an index is taken. Up to 64 uniform indexes are tried; if all are taken, the list is scanned linearly from a random start. A list with no free index is INVALID_ARGUMENT.

      Parameters

      • size: number
      • isUsed: (idx: number) => boolean
      • Optionalcrypto: CryptoProvider

      Returns number