INNER CODE UNIT · TypeScript

j

privy-io/shamir-secret-sharing · src/index.ts:177

    const j = randomIndices[i]! % 255; // Make sure to handle the case where the byte is 255.
    const temp = coordinates[i]!;
    coordinates[i] = coordinates[j]!;
    coordinates[j] = temp;
  }

  return coordinates;
}

// Helpers for declarative argument validation.
const AssertArgument = {
  instanceOf(object: any, constructor: Function, message: string) {
    if (object.constructor !== constructor) {
      throw new TypeError(message);
    }
  },

  inRange(n: number, start: number, until: number, message: string) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…