about summary refs log tree commit diff
path: root/src/nix-hash/nix-hash.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2005-01-14T12·03+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2005-01-14T12·03+0000
commit63791eb05b236afcea510d769a8943f8be3dbc9c (patch)
tree48b25ce1d2336bc41ab838475d915a7d01134e98 /src/nix-hash/nix-hash.cc
parent37b51a9aa6d5d0fb97bad0d1a27d27304da277c2 (diff)
* Add SHA-256.
* Tests for the various hashes.

Diffstat (limited to 'src/nix-hash/nix-hash.cc')
-rw-r--r--src/nix-hash/nix-hash.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nix-hash/nix-hash.cc b/src/nix-hash/nix-hash.cc
index 6a044972afb7..360e07960b0e 100644
--- a/src/nix-hash/nix-hash.cc
+++ b/src/nix-hash/nix-hash.cc
@@ -25,6 +25,7 @@ void run(Strings args)
             if (i == args.end()) throw UsageError("`--type' requires an argument");
             if (*i == "md5") ht = htMD5;
             else if (*i == "sha1") ht = htSHA1;
+            else if (*i == "sha256") ht = htSHA256;
             else throw UsageError(format("unknown hash type `%1%'") % *i);
         }
         else