From 46e0919ced4646004cc0701b188d0a68e24e8924 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Feb 2007 14:31:42 +0000 Subject: * `nix-store --export --sign': sign the Nix archive using the RSA key in /nix/etc/nix/signing-key.sec --- src/libutil/hash.hh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/libutil/hash.hh') diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh index 78227fb6a31b..85eb3c1b4d7e 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(); +}; + + } -- cgit 1.4.1