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:
parent
73992371a3
commit
7e8961f720
9 changed files with 487 additions and 26 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue