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

16 lines (15 loc) 450 B
/** * Split a secret into a set of distinct shares with a configured threshold * of shares needed for construction. * @public * @param {String|Buffer} secret * @param {Object} opts * @param {Object} opts.shares * @param {Object} opts.threshold * @param {?(Function)} opts.random * @returns {Array<Buffer>} * @throws TypeError * @throws RangeError */ declare function split(secret: any, opts: any): any[]; export { split };