diff --git a/core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java b/core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java index eba119fd7..ac90cf698 100644 --- a/core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java +++ b/core/src/main/java/org/bitcoinj/crypto/DeterministicHierarchy.java @@ -58,7 +58,7 @@ public class DeterministicHierarchy { } /** - * Inserts a key into the heirarchy. Used during deserialization: you normally don't need this. Keys must be + * Inserts a key into the hierarchy. Used during deserialization: you normally don't need this. Keys must be * inserted in order. */ public final void putKey(DeterministicKey key) { diff --git a/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java b/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java index 5043a0b89..124acc60f 100644 --- a/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java +++ b/core/src/main/java/org/bitcoinj/crypto/DeterministicKey.java @@ -355,13 +355,13 @@ public class DeterministicKey extends ECKey { public ECDSASignature sign(Sha256Hash input, @Nullable KeyParameter aesKey) throws KeyCrypterException { if (isEncrypted()) { // If the key is encrypted, ECKey.sign will decrypt it first before rerunning sign. Decryption walks the - // key heirarchy to find the private key (see below), so, we can just run the inherited method. + // key hierarchy to find the private key (see below), so, we can just run the inherited method. return super.sign(input, aesKey); } else { // If it's not encrypted, derive the private via the parents. final BigInteger privateKey = findOrDerivePrivateKey(); if (privateKey == null) { - // This key is a part of a public-key only heirarchy and cannot be used for signing + // This key is a part of a public-key only hierarchy and cannot be used for signing throw new MissingPrivateKeyException(); } return super.doSign(input, privateKey); @@ -583,7 +583,7 @@ public class DeterministicKey extends ECKey { } /** - * Verifies equality of all fields but NOT the parent pointer (thus the same key derived in two separate heirarchy + * Verifies equality of all fields but NOT the parent pointer (thus the same key derived in two separate hierarchy * objects will equal each other. */ @Override diff --git a/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java index 36cd9c161..756b2e100 100644 --- a/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java +++ b/core/src/main/java/org/bitcoinj/wallet/DeterministicKeyChain.java @@ -894,7 +894,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain { if (!isWatchingAccountKey) { // If the non-encrypted case, the non-leaf keys (account, internal, external) have already // been rederived and inserted at this point. In the encrypted case though, - // we can't rederive and we must reinsert, potentially building the heirarchy object + // we can't rederive and we must reinsert, potentially building the hierarchy object // if need be. if (path.size() == 0) { // Master key. diff --git a/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java index 95419356f..afcffb3e2 100644 --- a/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java +++ b/core/src/test/java/org/bitcoinj/crypto/ChildKeyDerivationTest.java @@ -136,7 +136,7 @@ public class ChildKeyDerivationTest { @Test public void encryptedDerivation() throws Exception { - // Check that encrypting a parent key in the heirarchy and then deriving from it yields a DeterministicKey + // Check that encrypting a parent key in the hierarchy and then deriving from it yields a DeterministicKey // with no private key component, and that the private key bytes are derived on demand. KeyCrypter scrypter = new KeyCrypterScrypt(); KeyParameter aesKey = scrypter.deriveKey("we never went to the moon");