aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2020-02-02 15:27:20 +1100
committerdaurnimator <quae@daurnimator.com>2020-02-06 00:16:00 +1100
commitb495512175b9b96fe0792680dc8716f0ec1936af (patch)
treef57b203a14d6f5d7a0ca118b6aee30c7ea7369fe /lib/std
parent5a095a3f083f5e2248b0d37bf499c350ad18179f (diff)
downloadzig-b495512175b9b96fe0792680dc8716f0ec1936af.tar.gz
zig-b495512175b9b96fe0792680dc8716f0ec1936af.zip
add gimli to crypto hash benchmark
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/crypto/benchmark.zig1
-rw-r--r--lib/std/crypto/gimli.zig2
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/std/crypto/benchmark.zig b/lib/std/crypto/benchmark.zig
index d9b84a6ed7..44326bfd97 100644
--- a/lib/std/crypto/benchmark.zig
+++ b/lib/std/crypto/benchmark.zig
@@ -23,6 +23,7 @@ const hashes = [_]Crypto{
Crypto{ .ty = crypto.Sha512, .name = "sha512" },
Crypto{ .ty = crypto.Sha3_256, .name = "sha3-256" },
Crypto{ .ty = crypto.Sha3_512, .name = "sha3-512" },
+ Crypto{ .ty = crypto.gimli.Hash, .name = "gimli-hash" },
Crypto{ .ty = crypto.Blake2s256, .name = "blake2s" },
Crypto{ .ty = crypto.Blake2b512, .name = "blake2b" },
Crypto{ .ty = crypto.Blake3, .name = "blake3" },
diff --git a/lib/std/crypto/gimli.zig b/lib/std/crypto/gimli.zig
index 1d835b231b..a8de919ea3 100644
--- a/lib/std/crypto/gimli.zig
+++ b/lib/std/crypto/gimli.zig
@@ -134,6 +134,8 @@ pub const Hash = struct {
}
}
+ pub const digest_length = 32;
+
/// Finish the current hashing operation, writing the hash to `out`
///
/// From 4.9 "Application to hashing"