Interface EncryptableKeyChain

    • Method Detail

      • toEncrypted

        EncryptableKeyChain toEncrypted​(KeyCrypter keyCrypter,
                                        AesKey aesKey)
        Returns a new keychain holding identical/cloned keys to this chain, but encrypted under the given key. Old keys and keychains remain valid and so you should ensure you don't accidentally hold references to them.
      • toDecrypted

        EncryptableKeyChain toDecrypted​(AesKey aesKey)
        Decrypt the key chain with the given AES key and whatever KeyCrypter is already set. Note that if you just want to spend money from an encrypted wallet, don't decrypt the whole thing first. Instead, set the SendRequest.aesKey field before asking the wallet to build the send.
        Parameters:
        aesKey - AES key to use (normally created using KeyCrypter#deriveKey and cached as it is time consuming to create from a password)
        Throws:
        KeyCrypterException - Thrown if the wallet decryption fails. If so, the wallet state is unchanged.
      • checkPassword

        boolean checkPassword​(java.lang.CharSequence password)
      • checkAESKey

        boolean checkAESKey​(AesKey aesKey)
      • getKeyCrypter

        @Nullable
        KeyCrypter getKeyCrypter()
        Returns the key crypter used by this key chain, or null if it's not encrypted.