mirror of
https://github.com/NixOS/nix.git
synced 2025-12-01 06:31:00 +01:00
libutils/hash: remove default encoding
This will make it easier to reason about the hash encoding and switch to SRI everywhere where possible.
This commit is contained in:
parent
01572c2198
commit
6ee03b8444
15 changed files with 40 additions and 40 deletions
|
|
@ -47,7 +47,7 @@ Attrs Input::toAttrs() const
|
|||
{
|
||||
auto attrs = toAttrsInternal();
|
||||
if (narHash)
|
||||
attrs.emplace("narHash", narHash->to_string(SRI));
|
||||
attrs.emplace("narHash", narHash->to_string(SRI, true));
|
||||
attrs.emplace("type", type());
|
||||
return attrs;
|
||||
}
|
||||
|
|
@ -67,7 +67,7 @@ std::pair<Tree, std::shared_ptr<const Input>> Input::fetchTree(ref<Store> store)
|
|||
|
||||
if (narHash && narHash != input->narHash)
|
||||
throw Error("NAR hash mismatch in input '%s' (%s), expected '%s', got '%s'",
|
||||
to_string(), tree.actualPath, narHash->to_string(SRI), input->narHash->to_string(SRI));
|
||||
to_string(), tree.actualPath, narHash->to_string(SRI, true), input->narHash->to_string(SRI, true));
|
||||
|
||||
return {std::move(tree), input};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue