mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
If hashes do not match, print them in base-32 for SHA-1/SHA-256
Fixes #57.
This commit is contained in:
parent
a28b4445a4
commit
4c34d384e6
3 changed files with 10 additions and 1 deletions
|
@ -153,6 +153,12 @@ string printHash32(const Hash & hash)
|
|||
}
|
||||
|
||||
|
||||
string printHash16or32(const Hash & hash)
|
||||
{
|
||||
return hash.type == htMD5 ? printHash(hash) : printHash32(hash);
|
||||
}
|
||||
|
||||
|
||||
static bool mul(unsigned char * bytes, unsigned char y, int maxSize)
|
||||
{
|
||||
unsigned char carry = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue