aes_gcm_encrypt
On-chain AES-256-GCM encryption
Overview
Signature
def aes_gcm_encrypt(
w3: Web3,
*,
aes_key: Bytes32,
nonce: int | EncryptionNonce,
plaintext: bytes,
) -> HexBytes
async def async_aes_gcm_encrypt(
w3: AsyncWeb3,
*,
aes_key: Bytes32,
nonce: int | EncryptionNonce,
plaintext: bytes,
) -> HexBytesParameters
Parameter
Type
Required
Description
Returns
Type
Description
Examples
Basic Usage
With Integer Nonce
With EncryptionNonce
Async Usage
Encrypt-Decrypt Round Trip
Encrypt Multiple Messages
With ECDH-Derived Key
How It Works
Gas Cost
Notes
Warnings
See Also
Last updated

