+ self.toRawEntropyHex = function(mnemonic) {
+ var b = mnemonicToBinaryString(mnemonic);
+ if (b === null)
+ return null;
+ var d = b.substring(0, b.length / 33 * 32);
+ var nd = binaryStringToWordArray(d);
+
+ var h = "";
+ for (var i=0; i<nd.length; i++) {
+ h += ('0000000' + nd[i].toString(16)).slice(-8);
+ }
+ return h;
+ }
+
+ self.toRawEntropyBin = function(mnemonic) {
+ var b = mnemonicToBinaryString(mnemonic);
+ var d = b.substring(0, b.length / 33 * 32);
+ return d;
+ }
+