Skip to content

Commit

Permalink
Merge pull request #13 from johanneskares/patch-1
Browse files Browse the repository at this point in the history
fix: spelling error
  • Loading branch information
oed authored Jul 16, 2024
2 parents 64f8aff + 4e54238 commit a57bb32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/seedsplit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const SECRET_LENGTH = 64

const lengthToPrefix = { 64: '', 56: 'd', 48: 'c', 40: 'b', 32: 'a' }
const prefixToLength = { '': 64, 'd': 56, 'c': 48, 'b': 40, 'a': 32 }
const getExtraEntopy = length => bip39.mnemonicToEntropy(
const getExtraEntropy = length => bip39.mnemonicToEntropy(
bip39.generateMnemonic(SECRET_LENGTH * 2)).substring(0, SECRET_LENGTH - length)


Expand All @@ -18,7 +18,7 @@ async function split(seed, numShards, threshold) {
}
let ent = bip39.mnemonicToEntropy(seed)
let prefix = lengthToPrefix[ent.length]
ent = ent + getExtraEntopy(ent.length)
ent = ent + getExtraEntropy(ent.length)

let shards = await ssss.createKeyshares(Buffer.from(ent, 'hex'), numShards, threshold)

Expand Down

0 comments on commit a57bb32

Please sign in to comment.