Interface WalletCryptoUtilities
- All Known Implementing Classes:
StandardWalletCryptoUtilities
public interface WalletCryptoUtilities
Encrypts and decrypts
Wallet
s.-
Method Summary
-
Method Details
-
encrypt
Encrypts theWallet
. If anyWalletAccount
whoseWalletAccount.isEncrypted()
flag is set to true, this method will throw an exception.- Parameters:
wallet
- the wallet contents itself- Returns:
- a
Wallet
instance encry
-
decrypt
Decrypts the wallet. If decryption fails, such as for bad passphrase, then the method will returnOptional.empty()
-
decrypt
Decrypts the wallet. If decryption fails, such as for bad passphrase, then the method will returnOptional.empty()
- Parameters:
unencryptedVaultKey
-encryptedWalletAccount
- theWalletAccount
- Returns:
- the
Optional<Wallet>
-