X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2Fjs%2Fentropy.js;fp=src%2Fjs%2Fentropy.js;h=db4051bd35fa55777361693c93d59e244addbf86;hb=c193ff67e821cf66f1d5bb4fcf8cf15d8a9bcde1;hp=cf981ff680ceae66c9a51f2dc23c84f1ef26d597;hpb=a3d78b7ddc5aa936d42f2952b9bbab5cd5820dfd;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git diff --git a/src/js/entropy.js b/src/js/entropy.js index cf981ff..db4051b 100644 --- a/src/js/entropy.js +++ b/src/js/entropy.js @@ -143,6 +143,13 @@ window.Entropy = new (function() { // Convert entropy to different formats var entropyBin = binLeadingZeros + entropyInt.toString(2); var entropyClean = base.parts.join(""); + if (base.asInt == 52) { + entropyClean = base.parts.join(" ").toUpperCase(); + entropyClean = entropyClean.replace(/C/g, "\u2663"); + entropyClean = entropyClean.replace(/D/g, "\u2666"); + entropyClean = entropyClean.replace(/H/g, "\u2665"); + entropyClean = entropyClean.replace(/S/g, "\u2660"); + } var e = { binaryStr: entropyBin, cleanStr: entropyClean,