HDW: Add an AUTHENTICATION key purpose that's mapped to the internal chain.

This commit is contained in:
Mike Hearn
2014-08-15 18:22:57 +02:00
parent f00aef2048
commit 1b92abe294
2 changed files with 4 additions and 2 deletions

View File

@@ -342,6 +342,7 @@ public class DeterministicKeyChain implements EncryptableKeyChain {
index = issuedExternalKeys;
parentKey = externalKey;
break;
case AUTHENTICATION:
case CHANGE:
issuedInternalKeys += numberOfKeys;
index = issuedInternalKeys;

View File

@@ -38,10 +38,11 @@ public interface KeyChain {
/** Returns true if the given key is in the chain. */
public boolean hasKey(ECKey key);
enum KeyPurpose {
public enum KeyPurpose {
RECEIVE_FUNDS,
CHANGE,
REFUND
REFUND,
AUTHENTICATION
}
/** Obtains a number of key/s intended for the given purpose. The chain may create new key/s, derive, or re-use an old one. */