diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-21 14:31:42 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-21 14:31:42 +0000 |
commit | 46e0919ced4646004cc0701b188d0a68e24e8924 (patch) | |
tree | 3262f8068c38489029753c528a123b2c685aea68 /src/libutil/hash.hh | |
parent | 6c9fdb17fbda181fc09a9ce1f49662ef522d006b (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.hh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh index 78227fb6a..85eb3c1b4 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(); +}; + + } |