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

* Added SHA-1 support. nix-hash' now has an option --type sha1' to

select SHA-1 hashing.
This commit is contained in:
Eelco Dolstra 2005-01-13 17:39:26 +00:00
parent 73992371a3
commit 7e8961f720
9 changed files with 487 additions and 26 deletions

View file

@ -47,15 +47,15 @@ Hash parseHash(const string & s);
bool isHash(const string & s);
/* Compute the hash of the given string. */
Hash hashString(const string & s);
Hash hashString(const string & s, HashType ht);
/* Compute the hash of the given file. */
Hash hashFile(const Path & path);
Hash hashFile(const Path & path, HashType ht);
/* Compute the hash of the given path. The hash is defined as
md5(dump(path)).
*/
Hash hashPath(const Path & path);
Hash hashPath(const Path & path, HashType ht);
#endif /* !__HASH_H */