UNPKG

shamirs-secret-sharing-ts

Version:

A simple implementation of Shamir's Secret Sharing configured to use a finite field in GF(2^8) with 128 bit padding

9 lines (8 loc) 242 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const randomBytes = require("randombytes"); function random(size) { const r = randomBytes(32 + size); return r.slice(32); } exports.random = random;