Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove brainwallets from site #106

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 4 additions & 119 deletions bitaddress.org.html
Original file line number Diff line number Diff line change
Expand Up @@ -6561,7 +6561,6 @@
<li class="tab" id="singlewallet" onclick="ninja.tab.select(this);">Single Wallet
<li class="tab" id="paperwallet" onclick="ninja.tab.select(this);">Paper Wallet
<li class="tab" id="bulkwallet" onclick="ninja.tab.select(this);">Bulk Wallet
<li class="tab" id="brainwallet" onclick="ninja.tab.select(this);">Brain Wallet
<li class="tab" id="vanitywallet" onclick="ninja.tab.select(this);">Vanity Wallet
<li class="tab" id="splitwallet" onclick="ninja.tab.select(this);">Split Wallet
<li class="tab" id="detailwallet" onclick="ninja.tab.select(this);">Wallet Details
Expand Down Expand Up @@ -6671,40 +6670,6 @@
</div>
</div>

<div id="brainarea" class="walletarea">
<div id="braincommands" class="commands">
<div class="row">
<span id="brainlabelenterpassphrase" class="label"><label for="brainpassphrase">Enter Passphrase: </label></span>
<input tabindex="1" type="password" id="brainpassphrase" value="" onfocus="this.select();" onkeypress="if (event.keyCode == 13) ninja.wallets.brainwallet.view();" />
<span><label id="brainlabelshow" for="brainpassphraseshow">Show?</label> <input type="checkbox" id="brainpassphraseshow" onchange="ninja.wallets.brainwallet.showToggle(this);" /></span>
<span class="print"><input type="button" name="print" id="brainprint" value="Print" onclick="window.print();" /></span>
</div>
<div class="row extra">
<span class="label" id="brainlabelconfirm"><label for="brainpassphraseconfirm">Confirm Passphrase: </label></span>
<input tabindex="2" type="password" id="brainpassphraseconfirm" value="" onfocus="this.select();" onkeypress="if (event.keyCode == 13) ninja.wallets.brainwallet.view();" />
<span><input tabindex="3" type="button" id="brainview" value="View" onclick="ninja.wallets.brainwallet.view();" /></span>
<span id="brainalgorithm" class="notes right">Algorithm: SHA256(passphrase)</span>
</div>
<div class="row extra"><span id="brainwarning"></span></div>
</div>
<div id="brainkeyarea" class="keyarea">
<div class="public">
<div id="brainqrcodepublic" class="qrcode_public"></div>
<div class="pubaddress">
<span class="label" id="brainlabelbitcoinaddress">Bitcoin Address:</span>
<span class="output" id="brainbtcaddress"></span>
</div>
</div>
<div class="private">
<div id="brainqrcodeprivate" class="qrcode_private"></div>
<div class="privwif">
<span class="label" id="brainlabelprivatekey">Private Key (Wallet Import Format):</span>
<span class="output" id="brainbtcprivwif"></span>
</div>
</div>
</div>
</div>

<div id="vanityarea" class="walletarea">
<div id="vanitystep1label" class="commands expandable" onclick="ninja.wallets.vanitywallet.openCloseStep(1);">
<span><label id="vanitylabelstep1">Step 1 - Generate your "Step1 Key Pair"</label> <input type="button" id="vanitynewkeypair"
Expand Down Expand Up @@ -7480,13 +7445,13 @@
}

// don't open tab if entropy still being collected
// exceptions: brainwallet detailwallet
if (ninja.seeder.isStillSeeding == false || walletType == "brainwallet" || walletType == "detailwallet") {
// exceptions: detailwallet
if (ninja.seeder.isStillSeeding == false || walletType == "detailwallet") {
walletTab.className += " selected";
document.getElementById("generate").style.display = "none";
ninja.wallets[walletTab.getAttribute("id")].open();
}
else if (ninja.seeder.isStillSeeding == true && !(walletType == "brainwallet" || walletType == "detailwallet")) {
else if (ninja.seeder.isStillSeeding == true && !(walletType == "detailwallet")) {
document.getElementById("generate").style.display = "block";
}
}
Expand Down Expand Up @@ -7623,7 +7588,6 @@
"singlewallet": "Single Wallet",
"paperwallet": "Paper Wallet",
"bulkwallet": "Bulk Wallet",
"brainwallet": "Brain Wallet",
"vanitywallet": "Vanity Wallet",
"splitwallet": "Split Wallet",
"detailwallet": "Wallet Details"
Expand Down Expand Up @@ -7657,7 +7621,6 @@
"singlewallet": "Una sola cartera",
"paperwallet": "Cartera en papel",
"bulkwallet": "Direcciones en masa",
"brainwallet": "Cartera mental",
"vanitywallet": "Cartera personalizada",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Detalles de la cartera",
Expand Down Expand Up @@ -7796,7 +7759,6 @@
"singlewallet": "Porte-Monnaie Simple",
"paperwallet": "Porte-Monnaie Papier",
"bulkwallet": "Porte-Monnaie En Vrac",
"brainwallet": "Porte-Monnaie Cerveau",
"vanitywallet": "Porte-Monnaie Vanité",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Détails du Porte-Monnaie",
Expand Down Expand Up @@ -7936,7 +7898,6 @@
"singlewallet": "Απλό Πορτοφόλι",
"paperwallet": "Χάρτινο Πορτοφόλι",
"bulkwallet": "Πολλαπλά Πορτοφόλια",
"brainwallet": "Μνημονικό Πορτοφόλι",
"vanitywallet": "Πορτοφόλι Vanity",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Λεπτομέρειες Πορτοφολιού",
Expand Down Expand Up @@ -8075,7 +8036,6 @@
"singlewallet": "Singolo portafoglio",
"paperwallet": "Paper Wallet",
"bulkwallet": "Portafogli multipli",
"brainwallet": "Brain Wallet",
"vanitywallet": "Vanity Wallet",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Dettagli portafoglio",
Expand Down Expand Up @@ -8214,7 +8174,6 @@
"singlewallet": "Einzelnes Wallet",
"paperwallet": "Papier-Wallet",
"bulkwallet": "Massen-Wallet",
"brainwallet": "Kopf-Wallet",
"vanitywallet": "Personalisiertes Wallet",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Walletdetails",
Expand Down Expand Up @@ -8353,7 +8312,6 @@
"singlewallet": "Jedna peněženka",
"paperwallet": "Papírová peněženka",
"bulkwallet": "Hromadná peněženka",
"brainwallet": "Myšlenková peněženka",
"vanitywallet": "Peněženka Vanity",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Detail peněženky",
Expand Down Expand Up @@ -8492,7 +8450,6 @@
"singlewallet": "Egyszerű pénztárca",
"paperwallet": "Papír pénztárca",
"bulkwallet": "Tömeges pénztárca",
"brainwallet": "Fejben tartott pénztárca",
"vanitywallet": "Kérkedő pénztárca",
"splitwallet": "Részekre bontott ~",
"detailwallet": "A pénztárca részletei",
Expand Down Expand Up @@ -8637,7 +8594,6 @@
"singlewallet": "シングルウォレット",
"paperwallet": "ペーパーウォレット",
"bulkwallet": "大量ウォレット",
"brainwallet": "暗記ウォレット",
"vanitywallet": "カスタムウォレット",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "ウォレットの詳細",
Expand Down Expand Up @@ -8783,7 +8739,6 @@
"singlewallet": "Carteira única",
"paperwallet": "Carteira em papel",
"bulkwallet": "Múltiplos endereços",
"brainwallet": "Carteira mental",
"vanitywallet": "Carteira personalizada",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Detalhes da carteira",
Expand Down Expand Up @@ -8922,7 +8877,6 @@
"singlewallet": "普通钱包",
"paperwallet": "纸钱包",
"bulkwallet": "批量钱包",
"brainwallet": "脑钱包",
"vanitywallet": "虚荣钱包",
"splitwallet": "分裂钱包",
"detailwallet": "钱包详情",
Expand Down Expand Up @@ -9067,7 +9021,6 @@
"singlewallet": "Один кошелек",
"paperwallet": "Бумажный кошелек",
"bulkwallet": "Несколько кошельков",
"brainwallet": "Умный кошелек",
"vanitywallet": "Персональный кошелек",
"splitwallet": "Split Wallet", //TODO: please translate
"detailwallet": "Детали кошелька",
Expand Down Expand Up @@ -9592,74 +9545,6 @@
};
</script>
<script type="text/javascript">
ninja.wallets.brainwallet = {
isOpen: function () {
return (document.getElementById("brainwallet").className.indexOf("selected") != -1);
},

open: function () {
document.getElementById("brainarea").style.display = "block";
document.getElementById("brainpassphrase").focus();
document.getElementById("brainwarning").innerHTML = ninja.translator.get("brainalertpassphrasewarning");
},

close: function () {
document.getElementById("brainarea").style.display = "none";
},

minPassphraseLength: 15,

view: function () {
var key = document.getElementById("brainpassphrase").value.toString()
document.getElementById("brainpassphrase").value = key;
var keyConfirm = document.getElementById("brainpassphraseconfirm").value.toString()
document.getElementById("brainpassphraseconfirm").value = keyConfirm;

if (key == keyConfirm || document.getElementById("brainpassphraseshow").checked) {
// enforce a minimum passphrase length
if (key.length >= ninja.wallets.brainwallet.minPassphraseLength) {
var bytes = Crypto.SHA256(key, { asBytes: true });
var btcKey = new Bitcoin.ECKey(bytes);
var bitcoinAddress = btcKey.getBitcoinAddress();
var privWif = btcKey.getBitcoinWalletImportFormat();
document.getElementById("brainbtcaddress").innerHTML = bitcoinAddress;
document.getElementById("brainbtcprivwif").innerHTML = privWif;
ninja.qrCode.showQrCode({
"brainqrcodepublic": bitcoinAddress,
"brainqrcodeprivate": privWif
});
document.getElementById("brainkeyarea").style.visibility = "visible";
}
else {
alert(ninja.translator.get("brainalertpassphrasetooshort") + ninja.translator.get("brainalertpassphrasewarning"));
ninja.wallets.brainwallet.clear();
}
}
else {
alert(ninja.translator.get("brainalertpassphrasedoesnotmatch"));
ninja.wallets.brainwallet.clear();
}
},

clear: function () {
document.getElementById("brainkeyarea").style.visibility = "hidden";
},

showToggle: function (element) {
if (element.checked) {
document.getElementById("brainpassphrase").setAttribute("type", "text");
document.getElementById("brainpassphraseconfirm").style.visibility = "hidden";
document.getElementById("brainlabelconfirm").style.visibility = "hidden";
}
else {
document.getElementById("brainpassphrase").setAttribute("type", "password");
document.getElementById("brainpassphraseconfirm").style.visibility = "visible";
document.getElementById("brainlabelconfirm").style.visibility = "visible";
}
}
};
</script>
<script type="text/javascript">
ninja.wallets.vanitywallet = {
isOpen: function () {
return (document.getElementById("vanitywallet").className.indexOf("selected") != -1);
Expand Down Expand Up @@ -9856,7 +9741,7 @@
var btcKey = new Bitcoin.ECKey(key);
if (btcKey.priv == null) {
// enforce a minimum passphrase length
if (key.length >= ninja.wallets.brainwallet.minPassphraseLength) {
if (key.length >= 15) {
// Deterministic Wallet confirm box to ask if user wants to SHA256 the input to get a private key
var usePassphrase = confirm(ninja.translator.get("detailconfirmsha256"));
if (usePassphrase) {
Expand Down
66 changes: 0 additions & 66 deletions src/ninja.brainwallet.js

This file was deleted.