CryptoError¶
Import: import system.crypto;
Read the usage guide for examples and common tasks. This reference lists the public declarations for this part of the library. See Reading API signatures for parameter and result notation.
CryptoError¶
Cryptographic operation failure implementing Error (currently AesGcm/AesGcmKey).
constructor¶
Creates an error with a machine code and message.
message¶
Human-readable explanation of the cryptographic failure, suitable for logs and error output.
code¶
Stable machine code (EINVAL_KEY, EINVAL_NONCE, EDECRYPT, …).
invalid_key¶
Key material has the wrong length or shape.
invalid_nonce¶
Nonce/IV has the wrong length.
decrypt_failed¶
Decryption failed: authentication tag mismatch, truncated ciphertext, or tampering.