Class StandardWalletCryptoUtilities
java.lang.Object
dev.getelements.elements.sdk.service.blockchain.crypto.StandardWalletCryptoUtilities
- All Implemented Interfaces:
WalletCryptoUtilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecrypts the wallet.decrypt(VaultKey unencryptedVaultKey, WalletAccount encryptedWalletAccount) Decrypts the wallet.Encrypts theWallet.com.fasterxml.jackson.databind.ObjectMapperjakarta.validation.ValidatorvoidsetCipherUtility(CipherUtility cipherUtility) voidsetCryptoKeyPairUtility(CryptoKeyPairUtility cryptoKeyPairUtility) voidsetObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) voidsetValidator(jakarta.validation.Validator validator)
-
Constructor Details
-
StandardWalletCryptoUtilities
public StandardWalletCryptoUtilities()
-
-
Method Details
-
encrypt
Description copied from interface:WalletCryptoUtilitiesEncrypts theWallet. If anyWalletAccountwhoseWalletAccount.isEncrypted()flag is set to true, this method will throw an exception.- Specified by:
encryptin interfaceWalletCryptoUtilities- Parameters:
wallet- the wallet contents itself- Returns:
- a
Walletinstance encry
-
decrypt
Description copied from interface:WalletCryptoUtilitiesDecrypts the wallet. If decryption fails, such as for bad passphrase, then the method will returnOptional.empty()- Specified by:
decryptin interfaceWalletCryptoUtilities- Parameters:
unencryptedVaultKey-wallet- theWallet- Returns:
- the
Optional<Wallet>
-
decrypt
public Optional<WalletAccount> decrypt(VaultKey unencryptedVaultKey, WalletAccount encryptedWalletAccount) Description copied from interface:WalletCryptoUtilitiesDecrypts the wallet. If decryption fails, such as for bad passphrase, then the method will returnOptional.empty()- Specified by:
decryptin interfaceWalletCryptoUtilities- Parameters:
unencryptedVaultKey-encryptedWalletAccount- theWalletAccount- Returns:
- the
Optional<Wallet>
-
getValidator
public jakarta.validation.Validator getValidator() -
setValidator
@Inject public void setValidator(jakarta.validation.Validator validator) -
getObjectMapper
public com.fasterxml.jackson.databind.ObjectMapper getObjectMapper() -
setObjectMapper
@Inject public void setObjectMapper(com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
getCipherUtility
-
setCipherUtility
-
getCryptoKeyPairUtility
-
setCryptoKeyPairUtility
-