Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 815bfa2893
...
compare: 2f51b174db
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
9 .idea/libraries/bsh_2_0b4.xml
@@ -0,0 +1,9 @@
+<component name="libraryTable">
+ <library name="bsh-2.0b4">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/org.beanshell/bsh/2.0b4/jar/a05f0a0feefa8d8467ac80e16e7de071489f0d9c/bsh-2.0b4.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+</component>
View
11 .idea/libraries/hamcrest_core_1_1.xml
@@ -0,0 +1,11 @@
+<component name="libraryTable">
+ <library name="hamcrest-core-1.1">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/org.hamcrest/hamcrest-core/1.1/jar/860340562250678d1a344907ac75754e259cdb14/hamcrest-core-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/org.hamcrest/hamcrest-core/1.1/source/2ccf1154d1a8936042a8a742dc3e611d02ac7213/hamcrest-core-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
View
11 .idea/libraries/jcommander_1_27.xml
@@ -0,0 +1,11 @@
+<component name="libraryTable">
+ <library name="jcommander-1.27">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/com.beust/jcommander/1.27/jar/58c9cbf0f1fa296f93c712f2cf46de50471920f9/jcommander-1.27.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/com.beust/jcommander/1.27/source/fae697ac46477a5227a5ee14f8f3a1270a4627b0/jcommander-1.27-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
View
11 .idea/libraries/junit_4_10.xml
@@ -0,0 +1,11 @@
+<component name="libraryTable">
+ <library name="junit-4.10">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/junit/junit/4.10/jar/e4f1766ce7404a08f45d859fb9c226fc9e41a861/junit-4.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/junit/junit/4.10/source/6c98d6766e72d5575f96c9479d1c1d3b865c6e25/junit-4.10-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
View
11 .idea/libraries/snakeyaml_1_12.xml
@@ -0,0 +1,11 @@
+<component name="libraryTable">
+ <library name="snakeyaml-1.12">
+ <CLASSES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/org.yaml/snakeyaml/1.12/bundle/ebe66a6b88caab31d7a19571ad23656377523545/snakeyaml-1.12.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$USER_HOME$/.gradle/caches/artifacts-24/filestore/org.yaml/snakeyaml/1.12/source/f86c67beb22f7d1edb5d6c6a3c4dab77a23234da/snakeyaml-1.12-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
View
9 src/main/java/com/fruitcat/bitcoin/BIP38.java
@@ -115,7 +115,7 @@ public static GeneratedKey encryptedKeyFromIntermediate(byte[] intermediate) thr
}
/**
- * Generates a confirmation code for the party that requested the key with an intermediate passphrase.
+ * Generates a confirmation code for the party that requested the address with an intermediate passphrase.
* @param flagByte
* @param addressHash
* @param ownerEntropy
@@ -145,7 +145,8 @@ private static String confirm(byte flagByte, byte[] addressHash, byte [] ownerEn
}
/**
- * Verifies a generated key.
+ * Verifies a generated key. TO DO: verify with just the confirmation code,
+ * so we don't have to decrypt the key to recalculate the address.
* @param passphrase
* @param generatedKey
* @return
@@ -397,8 +398,8 @@ else if (args[0].equals("-d")) {
}
private static void usage() {
- System.out.println("Usage: BIP38 [-d|-e] [passphrase] [key]\nEncrypts or decrypts a key.");
- System.out.println(" BIP38 [passphrase]\nGenerates a key encrypted with the passphrase.");
+ System.out.println("Usage: BIP38 [-d|-e] [passphrase] [key] - Encrypts or decrypts a key.");
+ System.out.println(" BIP38 [passphrase] - Generates a key encrypted with the passphrase.");
}
}
View
4 src/test/java/com/fruitcat/bitcoin/BIP38Test.java
@@ -1,8 +1,6 @@
package com.fruitcat.bitcoin;
import com.google.bitcoin.core.Base58;
-import com.google.bitcoin.core.DumpedPrivateKey;
-import com.google.bitcoin.params.MainNetParams;
import org.testng.annotations.Test;
import static org.testng.Assert.assertEquals;
@@ -62,4 +60,4 @@ public void checkConfirmation() throws Exception {
assert(BIP38.verify(testPass, gk));
assert(!BIP38.verify("garbage", gk));
}
-}
+}

No commit comments for this range

Something went wrong with that request. Please try again.