From: Ian Coleman Date: Wed, 9 Nov 2016 23:55:38 +0000 (+1100) Subject: Card entropy uses unicode suit symbols in cleanStr X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=c193ff67e821cf66f1d5bb4fcf8cf15d8a9bcde1;p=perso%2FImmae%2FProjets%2FCryptomonnaies%2FBIP39.git Card entropy uses unicode suit symbols in cleanStr --- 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,