core/crypto: Switch to using ensure

This commit is contained in:
Yawning Angel committed 2025-03-23 19:14:33 +09:00
1 parent dc94452fb9
commit 2f301e46dc
36 files changed
+188 -363

No files matched your search

+1 -3
View File
@@ -28,9 +28,7 @@ fe_from_bytes :: #force_inline proc "contextless" (
// makes implementing the actual MAC block processing considerably
// neater.
if len(arg1) != 16 {
panic_contextless("poly1305: invalid field element size")
}
ensure_contextless(len(arg1) == 16, "poly1305: invalid field element size")
// While it may be unwise to do deserialization here on our
// own when fiat-crypto provides equivalent functionality,