Document memory zeroization caveat

This commit is contained in:
thePR0M3TH3AN committed 2025-08-20 20:29:58 -04:00
1 parent 7a039171a0
commit 857b1ef0f9
3 files changed
+15 -1

No files matched your search

+8 -1
View File
@@ -3,9 +3,16 @@ from __future__ import annotations
import os
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
# TODO: Replace this Python implementation with a Rust/WASM module for
# critical cryptographic operations.
class InMemorySecret:
"""Store sensitive data encrypted in RAM using AES-GCM."""
"""Store sensitive data encrypted in RAM using AES-GCM.
Zeroization is best-effort only; Python's memory management may retain
copies of the plaintext.
"""
def __init__(self, data: bytes) -> None:
if not isinstance(data, (bytes, bytearray)):