diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/__global.zig | 4 | ||||
-rw-r--r-- | src/sha.zig | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/__global.zig b/src/__global.zig index bcb5973df..f46af5f19 100644 --- a/src/__global.zig +++ b/src/__global.zig @@ -14,9 +14,9 @@ else pub const package_json_version_with_sha = if (Environment.git_sha.len == 0) package_json_version else if (Environment.isDebug) - std.fmt.comptimePrint("0.1.{d}_debug ({s})", .{ build_id, Environment.git_sha[0..8] }) + std.fmt.comptimePrint("0.1.{d}_debug ({s})", .{ build_id, Environment.git_sha[0..@minimum(Environment.git_sha.len, 8)] }) else - std.fmt.comptimePrint("0.1.{d} ({s})", .{ build_id, Environment.git_sha[0..8] }); + std.fmt.comptimePrint("0.1.{d} ({s})", .{ build_id, Environment.git_sha[0..@minimum(Environment.git_sha.len, 8)] }); pub const os_name = if (Environment.isWindows) "win32" diff --git a/src/sha.zig b/src/sha.zig index 354c1583b..c6e0c5cdd 100644 --- a/src/sha.zig +++ b/src/sha.zig @@ -71,8 +71,8 @@ fn NewEVP( } pub const EVP = struct { pub const SHA1 = NewEVP(std.crypto.hash.Sha1.digest_length, "EVP_sha1"); - pub const MD5 = NewEVP(32, "EVP_md5"); - pub const MD4 = NewEVP(32, "EVP_md4"); + pub const MD5 = NewEVP(16, "EVP_md5"); + pub const MD4 = NewEVP(16, "EVP_md4"); pub const SHA224 = NewEVP(28, "EVP_sha224"); pub const SHA512 = NewEVP(std.crypto.hash.sha2.Sha512.digest_length, "EVP_sha512"); pub const SHA384 = NewEVP(std.crypto.hash.sha2.Sha384.digest_length, "EVP_sha384"); |