/** * Returns whether the given password is correct for this key chain. * @throws IllegalStateException if the chain is not encrypted at all. */ @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); }
/** * Returns whether the given password is correct for this key chain. * @throws IllegalStateException if the chain is not encrypted at all. */ @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); }
/** * Returns whether the given password is correct for this key chain. * @throws IllegalStateException if the chain is not encrypted at all. */ @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); }
/** * Returns whether the given password is correct for this key chain. * @throws IllegalStateException if the chain is not encrypted at all. */ @Override public boolean checkPassword(CharSequence password) { checkNotNull(password); checkState(keyCrypter != null, "Key chain not encrypted"); return checkAESKey(keyCrypter.deriveKey(password)); }
public boolean checkAESKey(KeyParameter aesKey) { checkState(keyCrypter != null, "Not encrypted"); if (basic.numKeys() > 0) return basic.checkAESKey(aesKey); return getActiveKeyChain().checkAESKey(aesKey); }
public boolean checkAESKey(KeyParameter aesKey) { checkState(keyCrypter != null, "Not encrypted"); if (basic.numKeys() > 0) return basic.checkAESKey(aesKey); return getActiveKeyChain().checkAESKey(aesKey); }
public boolean checkAESKey(KeyParameter aesKey) { checkState(keyCrypter != null, "Not encrypted"); if (basic.numKeys() > 0) return basic.checkAESKey(aesKey); return getActiveKeyChain().checkAESKey(aesKey); }
public boolean checkAESKey(KeyParameter aesKey) { checkState(keyCrypter != null, "Not encrypted"); if (basic.numKeys() > 0) return basic.checkAESKey(aesKey); return getActiveKeyChain().checkAESKey(aesKey); }
@Override public BasicKeyChain toDecrypted(KeyParameter aesKey) { lock.lock(); try { checkState(keyCrypter != null, "Wallet is already decrypted"); // Do an up-front check. if (numKeys() > 0 && !checkAESKey(aesKey)) throw new KeyCrypterException("Password/key was incorrect."); BasicKeyChain decrypted = new BasicKeyChain(); for (ECKey key : hashToKeys.values()) { decrypted.importKeyLocked(key.decrypt(aesKey)); } return decrypted; } finally { lock.unlock(); } }
@Override public BasicKeyChain toDecrypted(KeyParameter aesKey) { lock.lock(); try { checkState(keyCrypter != null, "Wallet is already decrypted"); // Do an up-front check. if (numKeys() > 0 && !checkAESKey(aesKey)) throw new KeyCrypterException("Password/key was incorrect."); BasicKeyChain decrypted = new BasicKeyChain(); for (ECKey key : hashToKeys.values()) { decrypted.importKeyLocked(key.decrypt(aesKey)); } return decrypted; } finally { lock.unlock(); } }
@Override public BasicKeyChain toDecrypted(KeyParameter aesKey) { lock.lock(); try { checkState(keyCrypter != null, "Wallet is already decrypted"); // Do an up-front check. if (numKeys() > 0 && !checkAESKey(aesKey)) throw new KeyCrypterException("Password/key was incorrect."); BasicKeyChain decrypted = new BasicKeyChain(); for (ECKey key : hashToKeys.values()) { decrypted.importKeyLocked(key.decrypt(aesKey)); } return decrypted; } finally { lock.unlock(); } }
@Override public BasicKeyChain toDecrypted(KeyParameter aesKey) { lock.lock(); try { checkState(keyCrypter != null, "Wallet is already decrypted"); // Do an up-front check. if (numKeys() > 0 && !checkAESKey(aesKey)) throw new KeyCrypterException("Password/key was incorrect."); BasicKeyChain decrypted = new BasicKeyChain(); for (ECKey key : hashToKeys.values()) { decrypted.importKeyLocked(key.decrypt(aesKey)); } return decrypted; } finally { lock.unlock(); } }