Skip to content
Standard libraryZig 0.17.1Official documentation
Sourcestd/crypto/errors.zig

Source line 1

std.crypto.errors.AuthenticationError

error-set

Source line 2

Errors

AuthenticationFailed

std.crypto.errors.ContextTooLongError

error-set

Source line 38

Context string is too long

Errors

ContextTooLong

std.crypto.errors.EncodingError

error-set

Source line 11

Encoded input cannot be decoded

Errors

InvalidEncoding

std.crypto.errors.Error

error-set

Source line 41

Any error related to cryptography operations

Errors

AuthenticationFailed AuthenticationError
ContextTooLong ContextTooLongError
IdentityElement IdentityElementError
InvalidEncoding EncodingError
KeyMismatch KeyMismatchError
NonCanonical NonCanonicalError
NotSquare NotSquareError
OutputTooLong OutputTooLongError
PasswordVerificationFailed PasswordVerificationError
SignatureVerificationFailed SignatureVerificationError
UnexpectedSubgroup UnexpectedSubgroupError
WeakParameters WeakParametersError
WeakPublicKey WeakPublicKeyError

std.crypto.errors.IdentityElementError

error-set

Source line 8

Finite field operation returned the identity element

Errors

IdentityElement

std.crypto.errors.KeyMismatchError

error-set

Source line 17

Both a public and secret key have been provided, but they are incompatible

Errors

KeyMismatch

std.crypto.errors.NonCanonicalError

error-set

Source line 20

Encoded input is not in canonical form

Errors

NonCanonical

std.crypto.errors.NotSquareError

error-set

Source line 23

Square root has no solutions

Errors

NotSquare

std.crypto.errors.OutputTooLongError

error-set

Source line 5

The requested output length is too long for the chosen algorithm

Errors

OutputTooLong

std.crypto.errors.PasswordVerificationError

error-set

Source line 26

Verification string doesn't match the provided password and parameters

Errors

PasswordVerificationFailed

std.crypto.errors.SignatureVerificationError

error-set

Source line 14

The signature doesn't verify for the given message and public key

Errors

SignatureVerificationFailed

std.crypto.errors.UnexpectedSubgroupError

error-set

Source line 35

Point is not in the prime order group

Errors

UnexpectedSubgroup

std.crypto.errors.WeakParametersError

error-set

Source line 29

Parameters would be insecure to use

Errors

WeakParameters

std.crypto.errors.WeakPublicKeyError

error-set

Source line 32

Public key would be insecure to use

Errors

WeakPublicKey
Source code

std/crypto/errors.zig

/// MAC verification failed - The tag doesn't verify for the given ciphertext and secret key
pub const AuthenticationError = error{AuthenticationFailed};

/// The requested output length is too long for the chosen algorithm
pub const OutputTooLongError = error{OutputTooLong};

/// Finite field operation returned the identity element
pub const IdentityElementError = error{IdentityElement};

/// Encoded input cannot be decoded
pub const EncodingError = error{InvalidEncoding};

/// The signature doesn't verify for the given message and public key
pub const SignatureVerificationError = error{SignatureVerificationFailed};

/// Both a public and secret key have been provided, but they are incompatible
pub const KeyMismatchError = error{KeyMismatch};

/// Encoded input is not in canonical form
pub const NonCanonicalError = error{NonCanonical};

/// Square root has no solutions
pub const NotSquareError = error{NotSquare};

/// Verification string doesn't match the provided password and parameters
pub const PasswordVerificationError = error{PasswordVerificationFailed};

/// Parameters would be insecure to use
pub const WeakParametersError = error{WeakParameters};

/// Public key would be insecure to use
pub const WeakPublicKeyError = error{WeakPublicKey};

/// Point is not in the prime order group
pub const UnexpectedSubgroupError = error{UnexpectedSubgroup};

/// Context string is too long
pub const ContextTooLongError = error{ContextTooLong};

/// Any error related to cryptography operations
pub const Error = AuthenticationError || OutputTooLongError || IdentityElementError || EncodingError || SignatureVerificationError || KeyMismatchError || NonCanonicalError || NotSquareError || PasswordVerificationError || WeakParametersError || WeakPublicKeyError || UnexpectedSubgroupError || ContextTooLongError;