AES-GCM Decrypt
Input
Offset
Field
Type
Description
Output
Bytes
Type
Description
Use cases
Examples
Built-in helper
Manual usage
Last updated
Last updated
function aes_gcm_decrypt(sbytes32 key, uint96 nonce, bytes memory ciphertext) view returns (bytes memory);bytes memory plaintext = aes_gcm_decrypt(aesKey, nonce, ciphertext);function aesDecrypt(
suint256 key,
uint96 nonce,
bytes memory ciphertext
) internal view returns (bytes memory) {
bytes memory input = abi.encodePacked(uint256(key), nonce, ciphertext);
(bool success, bytes memory result) = address(0x67).staticcall(input);
require(success, "AES-GCM Decrypt precompile failed");
return result;
}