aboutsummaryrefslogtreecommitdiff
path: root/lib/std/crypto/error.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-03-28 21:42:56 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-03-28 21:42:56 -0700
commitb85ef2300fa72f5f4c73b8eb9e14f0218ada592d (patch)
treedaee8ab81eaefb5433f6ba3750656ba769a311a4 /lib/std/crypto/error.zig
parent75080e351af8be45722bca50c1d5fcd503304d77 (diff)
parent175adc0bd738c2e3a55bb71c6a53dcc920c203ba (diff)
downloadzig-b85ef2300fa72f5f4c73b8eb9e14f0218ada592d.tar.gz
zig-b85ef2300fa72f5f4c73b8eb9e14f0218ada592d.zip
Merge remote-tracking branch 'origin/master' into llvm12
Diffstat (limited to 'lib/std/crypto/error.zig')
-rw-r--r--lib/std/crypto/error.zig34
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/std/crypto/error.zig b/lib/std/crypto/error.zig
new file mode 100644
index 0000000000..4cb12bb8f7
--- /dev/null
+++ b/lib/std/crypto/error.zig
@@ -0,0 +1,34 @@
+pub const Error = error{
+ /// MAC verification failed - The tag doesn't verify for the given ciphertext and secret key
+ AuthenticationFailed,
+
+ /// The requested output length is too long for the chosen algorithm
+ OutputTooLong,
+
+ /// Finite field operation returned the identity element
+ IdentityElement,
+
+ /// Encoded input cannot be decoded
+ InvalidEncoding,
+
+ /// The signature does't verify for the given message and public key
+ SignatureVerificationFailed,
+
+ /// Both a public and secret key have been provided, but they are incompatible
+ KeyMismatch,
+
+ /// Encoded input is not in canonical form
+ NonCanonical,
+
+ /// Square root has no solutions
+ NotSquare,
+
+ /// Verification string doesn't match the provided password and parameters
+ PasswordVerificationFailed,
+
+ /// Parameters would be insecure to use
+ WeakParameters,
+
+ /// Public key would be insecure to use
+ WeakPublicKey,
+};