跳转到内容

std.crypto.errors

标准库Zig 0.17.0官方原文
源码std/crypto/errors.zig

第 1 行

std.crypto.errors.AuthenticationError

错误集合

第 2 行

错误

AuthenticationFailed

std.crypto.errors.ContextTooLongError

错误集合

第 38 行

上下文字符串过长

错误

ContextTooLong

std.crypto.errors.EncodingError

错误集合

第 11 行

无法解码已编码的输入

错误

InvalidEncoding

std.crypto.errors.Error

错误集合

第 41 行

与密码学操作相关的任何错误

错误

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

错误集合

第 8 行

有限域运算返回了单位元

错误

IdentityElement

std.crypto.errors.KeyMismatchError

错误集合

第 17 行

同时提供了公钥和私钥,但它们不兼容。

错误

KeyMismatch

std.crypto.errors.NonCanonicalError

错误集合

第 20 行

编码输入不符合规范形式

错误

NonCanonical

std.crypto.errors.NotSquareError

错误集合

第 23 行

平方根无解

错误

NotSquare

std.crypto.errors.OutputTooLongError

错误集合

第 5 行

请求的输出长度超过所选算法的限制

错误

OutputTooLong

std.crypto.errors.PasswordVerificationError

错误集合

第 26 行

验证字符串与提供的密码及参数不匹配

错误

PasswordVerificationFailed

std.crypto.errors.SignatureVerificationError

错误集合

第 14 行

使用给定消息和公钥无法验证该签名

错误

SignatureVerificationFailed

std.crypto.errors.UnexpectedSubgroupError

错误集合

第 35 行

点不属于素数阶群

错误

UnexpectedSubgroup

std.crypto.errors.WeakParametersError

错误集合

第 29 行

这些参数不适合用于安全场景

错误

WeakParameters

std.crypto.errors.WeakPublicKeyError

错误集合

第 32 行

使用此公钥将不安全

错误

WeakPublicKey
源码

std/crypto/errors.zig

/// MAC 验证失败——对于给定密文和密钥,标签未通过验证
pub const AuthenticationError = error{AuthenticationFailed};

/// 请求的输出长度超过所选算法的限制
pub const OutputTooLongError = error{OutputTooLong};

/// 有限域运算返回了单位元
pub const IdentityElementError = error{IdentityElement};

/// 无法解码已编码的输入
pub const EncodingError = error{InvalidEncoding};

/// 使用给定消息和公钥无法验证该签名
pub const SignatureVerificationError = error{SignatureVerificationFailed};

/// 同时提供了公钥和私钥,但它们不兼容。
pub const KeyMismatchError = error{KeyMismatch};

/// 编码输入不符合规范形式
pub const NonCanonicalError = error{NonCanonical};

/// 平方根无解
pub const NotSquareError = error{NotSquare};

/// 验证字符串与提供的密码及参数不匹配
pub const PasswordVerificationError = error{PasswordVerificationFailed};

/// 这些参数不适合用于安全场景
pub const WeakParametersError = error{WeakParameters};

/// 使用此公钥将不安全
pub const WeakPublicKeyError = error{WeakPublicKey};

/// 点不属于素数阶群
pub const UnexpectedSubgroupError = error{UnexpectedSubgroup};

/// 上下文字符串过长
pub const ContextTooLongError = error{ContextTooLong};

/// 与密码学操作相关的任何错误
pub const Error = AuthenticationError || OutputTooLongError || IdentityElementError || EncodingError || SignatureVerificationError || KeyMismatchError || NonCanonicalError || NotSquareError || PasswordVerificationError || WeakParametersError || WeakPublicKeyError || UnexpectedSubgroupError || ContextTooLongError;