@Test(expected = IllegalStateException.class) public void checkPasswordNoKeys() { chain.checkPassword("test"); }
@Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); }
BasicKeyChain implements EncryptableKeyChain { @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); } }
BasicKeyChain implements EncryptableKeyChain { @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); } BasicKeyChain();  BasicKeyChain(@Nullable KeyCrypter crypter); }
BasicKeyChain implements EncryptableKeyChain { @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); } BasicKeyChain();  BasicKeyChain(@Nullable KeyCrypter crypter); @Override @Nullable KeyCrypter getKeyCrypter(); @Override ECKey getKey(@Nullable KeyPurpose ignored); @Override List<ECKey> getKeys(@Nullable KeyPurpose purpose, int numberOfKeys); List<ECKey> getKeys(); int importKeys(ECKey... keys); int importKeys(List<? extends ECKey> keys); void importKey(ECKey key); ECKey findKeyFromPubHash(byte[] pubkeyHash); ECKey findKeyFromPubKey(byte[] pubkey); @Override boolean hasKey(ECKey key); @Override int numKeys(); State isWatching(); boolean removeKey(ECKey key); @Override long getEarliestKeyCreationTime(); List<ListenerRegistration<KeyChainEventListener>> getListeners(); @Override List<Protos.Key> serializeToProtobuf(); static BasicKeyChain fromProtobufUnencrypted(List<Protos.Key> keys); static BasicKeyChain fromProtobufEncrypted(List<Protos.Key> keys, KeyCrypter crypter); @Override void addEventListener(KeyChainEventListener listener); @Override void addEventListener(KeyChainEventListener listener, Executor executor); @Override boolean removeEventListener(KeyChainEventListener listener); @Override BasicKeyChain toEncrypted(CharSequence password); @Override BasicKeyChain toEncrypted(KeyCrypter keyCrypter, KeyParameter aesKey); @Override BasicKeyChain toDecrypted(CharSequence password); @Override BasicKeyChain toDecrypted(KeyParameter aesKey); @Override boolean checkPassword(CharSequence password); @Override boolean checkAESKey(KeyParameter aesKey); @Override BloomFilter getFilter(int size, double falsePositiveRate, long tweak); @Override int numBloomFilterEntries(); @Nullable ECKey findOldestKeyAfter(long timeSecs); List<ECKey> findKeysBefore(long timeSecs); }
BasicKeyChain implements EncryptableKeyChain { @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); } BasicKeyChain();  BasicKeyChain(@Nullable KeyCrypter crypter); @Override @Nullable KeyCrypter getKeyCrypter(); @Override ECKey getKey(@Nullable KeyPurpose ignored); @Override List<ECKey> getKeys(@Nullable KeyPurpose purpose, int numberOfKeys); List<ECKey> getKeys(); int importKeys(ECKey... keys); int importKeys(List<? extends ECKey> keys); void importKey(ECKey key); ECKey findKeyFromPubHash(byte[] pubkeyHash); ECKey findKeyFromPubKey(byte[] pubkey); @Override boolean hasKey(ECKey key); @Override int numKeys(); State isWatching(); boolean removeKey(ECKey key); @Override long getEarliestKeyCreationTime(); List<ListenerRegistration<KeyChainEventListener>> getListeners(); @Override List<Protos.Key> serializeToProtobuf(); static BasicKeyChain fromProtobufUnencrypted(List<Protos.Key> keys); static BasicKeyChain fromProtobufEncrypted(List<Protos.Key> keys, KeyCrypter crypter); @Override void addEventListener(KeyChainEventListener listener); @Override void addEventListener(KeyChainEventListener listener, Executor executor); @Override boolean removeEventListener(KeyChainEventListener listener); @Override BasicKeyChain toEncrypted(CharSequence password); @Override BasicKeyChain toEncrypted(KeyCrypter keyCrypter, KeyParameter aesKey); @Override BasicKeyChain toDecrypted(CharSequence password); @Override BasicKeyChain toDecrypted(KeyParameter aesKey); @Override boolean checkPassword(CharSequence password); @Override boolean checkAESKey(KeyParameter aesKey); @Override BloomFilter getFilter(int size, double falsePositiveRate, long tweak); @Override int numBloomFilterEntries(); @Nullable ECKey findOldestKeyAfter(long timeSecs); List<ECKey> findKeysBefore(long timeSecs);  }