miniproto.crypto.native.aes_256_gcm_decrypt_native
miniproto.crypto.native.aes_256_gcm_decrypt_native
Section titled “miniproto.crypto.native.aes_256_gcm_decrypt_native”aes_256_gcm_decrypt_native(ciphertext_and_tag: bytes, key: bytes, nonce: bytes, associated_data: bytes) -> bytesAuthenticate and decrypt with explicit compiled Rust AES-256-GCM.
Parameters:
- ciphertext_and_tag (
bytes) – Ciphertext with its appended authentication tag. - key (
bytes) – Exactly 32 bytes of AES-256 key material. - nonce (
bytes) – Exactly 12 bytes used for encryption. - associated_data (
bytes) – Exact associated data used for encryption.
Returns:
bytes– Verified plaintext.
Raises:
RuntimeError– If native session AES-GCM is unavailable.ValueError– If inputs are invalid or authentication fails.
This no-fallback variant is suitable only when native capability is an explicit requirement; do not consume plaintext when it raises.