3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 18:25:51 +00:00

Fix spelling in comments: heirarchy → hierarchy

This commit is contained in:
Andreas Schildbach 2017-11-24 13:23:27 +01:00
parent 3cc652858c
commit 61e5d714c3
4 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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

View File

@ -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.

View File

@ -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");