1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

* Start move towards SHA-256 hashes instead of MD5.

* Start cleaning up unique store path generation (they weren't always
  unique; in particular the suffix ("-aterm-2.2", "-builder.sh") was
  not part of the hash, therefore changes to the suffix would cause
  multiple store objects with the same hash).
This commit is contained in:
Eelco Dolstra 2005-01-14 13:51:38 +00:00
parent a7b94e87d7
commit 9530cc3170
9 changed files with 63 additions and 34 deletions

View file

@ -22,6 +22,7 @@ Hash::Hash(HashType type)
else if (type == htSHA1) hashSize = sha1HashSize;
else if (type == htSHA256) hashSize = sha256HashSize;
else throw Error("unknown hash type");
assert(hashSize <= maxHashSize);
memset(hash, 0, hashSize);
}