aboutsummaryrefslogtreecommitdiff
path: root/perl
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2020-06-03 12:38:23 +0200
committerzimbatm <zimbatm@zimbatm.com>2020-06-03 13:49:51 +0200
commit6ee03b8444e1838b9985a9fd4f0f46947e958b3b (patch)
treee40d764bc72255778bf3e9e21355973c619b8dc5 /perl
parent01572c2198de49071827f0be9f5db202bac21703 (diff)
libutils/hash: remove default encoding
This will make it easier to reason about the hash encoding and switch to SRI everywhere where possible.
Diffstat (limited to 'perl')
-rw-r--r--perl/lib/Nix/Store.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl/lib/Nix/Store.xs b/perl/lib/Nix/Store.xs
index 890310b3e..945ed49c7 100644
--- a/perl/lib/Nix/Store.xs
+++ b/perl/lib/Nix/Store.xs
@@ -80,7 +80,7 @@ SV * queryReferences(char * path)
SV * queryPathHash(char * path)
PPCODE:
try {
- auto s = store()->queryPathInfo(store()->parseStorePath(path))->narHash.to_string();
+ auto s = store()->queryPathInfo(store()->parseStorePath(path))->narHash.to_string(Base32, true);
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
} catch (Error & e) {
croak("%s", e.what());
@@ -106,7 +106,7 @@ SV * queryPathInfo(char * path, int base32)
XPUSHs(&PL_sv_undef);
else
XPUSHs(sv_2mortal(newSVpv(store()->printStorePath(*info->deriver).c_str(), 0)));
- auto s = info->narHash.to_string(base32 ? Base32 : Base16);
+ auto s = info->narHash.to_string(base32 ? Base32 : Base16, true);
XPUSHs(sv_2mortal(newSVpv(s.c_str(), 0)));
mXPUSHi(info->registrationTime);
mXPUSHi(info->narSize);