about summary refs log tree commit diff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2007-02-21T14·31+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2007-02-21T14·31+0000
commit46e0919ced4646004cc0701b188d0a68e24e8924 (patch)
tree3262f8068c38489029753c528a123b2c685aea68 /src/libutil/hash.hh
parent6c9fdb17fbda181fc09a9ce1f49662ef522d006b (diff)
* `nix-store --export --sign': sign the Nix archive using the RSA key
  in /nix/etc/nix/signing-key.sec

Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 78227fb6a3..85eb3c1b4d 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -2,6 +2,7 @@
 #define __HASH_H
 
 #include "types.hh"
+#include "serialise.hh"
 
 
 namespace nix {
@@ -81,7 +82,23 @@ Hash compressHash(const Hash & hash, unsigned int newSize);
 /* Parse a string representing a hash type. */
 HashType parseHashType(const string & s);
 
- 
+
+typedef union Ctx;
+
+class HashSink : public Sink
+{
+private:
+    HashType ht;
+    Ctx * ctx;
+
+public:
+    HashSink(HashType ht);
+    ~HashSink();
+    virtual void operator () (const unsigned char * data, unsigned int len);
+    Hash finish();
+};
+
+
 }