build/secret-sharing.js
// Pads a string `str` with zeros on the left so that its length is a multiple of `bits`
Pads a string `str` with zeros on the left so that its length is a multiple of `bits`
Pads a string ` str ` with zeros on the left so that its length is a multiple of ` bits `
function padLeft (str, multipleOfBits) {
    var missing
    if (multipleOfBits === 0 || multipleOfBits === 1) {
      return str
    }
    if (multipleOfBits && multipleOfBits > 1024) {
      throw new Error('Padding must be multiples of no larger than 1024 bits.')
    }
    multipleOfBits = multipleOfBits || config.bits
    if (str) {
      missing = str.length % multipleOfBits
    }
    if (missing) {
      return (preGenPadding + str).slice(-(multipleOfBits - missing + str.length))
    }
    return str
  }
function padLeft ( str , multipleOfBits ) { var missing if ( multipleOfBits === 0 || multipleOfBits === 1 ) { return str } if ( multipleOfBits && multipleOfBits > 1024 ) { throw new Error ( 'Padding must be multiples of no larger than 1024 bits.' ) } multipleOfBits = multipleOfBits || config . bits if ( str ) { missing = str . length % multipleOfBits } if ( missing ) { return ( preGenPadding + str ) . slice ( - ( multipleOfBits - missing + str . length ) ) } return str }
Pads a string `str` with zeros on the left so that its length is a multiple of `bits`
Pads a string ` str ` with zeros on the left so that its length is a multiple of ` bits `