snix/tvix/nix-compat/src/nixhash
Ryan Lahfa e98ea31bbd fix(nix-compat): accept SRI hashes of invalid length
In cl/10468, we accepted SRI hashes of invalid padding while checking
their trailing bits.

In this commit, we accept SRI hashes of invalid padding and invalid length, as Nix does.

Real world example: `pkgs.javaPackages.openjfx11.deps`
<849e4dc5ff/pkgs/development/compilers/openjdk/openjfx/11.nix (L71)>
in nixpkgs.

Change-Id: I834437e7b94dab9fbb030163f7a2741f52bbf03a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10668
Autosubmit: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
2024-01-20 17:14:30 +00:00
..
algos.rs refactor(tvix/nix-compat): make NixHash an enum with fixed-len bytes 2023-10-14 17:55:08 +00:00
ca_hash.rs refactor(tvix/nix-compat): cleanup parse_{ca,hash} and fmt structs 2023-11-22 17:54:59 +00:00
mod.rs fix(nix-compat): accept SRI hashes of invalid length 2024-01-20 17:14:30 +00:00