Aes Gcm Key¶
Import: import system.crypto;
AesGcmKey¶
A 256-bit AesGcm key. Wraps raw bytes so callers can't accidentally pass the wrong-sized buffer where a key is expected.
generate¶
Generates a fresh random 256-bit key from the OS CSPRNG.
from_bytes¶
Wraps exactly 32 raw key bytes, or an error when the length is wrong.
to_bytes¶
The raw 32 key bytes.