1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 19:01:16 +02:00

Support base-64 hashes

Also simplify the Hash API.

Fixes #1437.
This commit is contained in:
Eelco Dolstra 2017-07-04 14:47:59 +02:00
parent fe97c69898
commit c0015e87af
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
23 changed files with 205 additions and 213 deletions

View file

@ -203,9 +203,9 @@ public:
narInfo->url = queryNAR.getStr(3);
narInfo->compression = queryNAR.getStr(4);
if (!queryNAR.isNull(5))
narInfo->fileHash = parseHash(queryNAR.getStr(5));
narInfo->fileHash = Hash(queryNAR.getStr(5));
narInfo->fileSize = queryNAR.getInt(6);
narInfo->narHash = parseHash(queryNAR.getStr(7));
narInfo->narHash = Hash(queryNAR.getStr(7));
narInfo->narSize = queryNAR.getInt(8);
for (auto & r : tokenizeString<Strings>(queryNAR.getStr(9), " "))
narInfo->references.insert(cache.storeDir + "/" + r);