diff options
Diffstat (limited to 'sha1dc/sha1.h')
-rw-r--r-- | sha1dc/sha1.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sha1dc/sha1.h b/sha1dc/sha1.h index 7d4d423..bd8bd92 100644 --- a/sha1dc/sha1.h +++ b/sha1dc/sha1.h @@ -100,6 +100,21 @@ void SHA1DCUpdate(SHA1_CTX*, const char*, size_t); /* returns: 0 = no collision detected, otherwise = collision found => warn user for active attack */ int SHA1DCFinal(unsigned char[20], SHA1_CTX*); +/* + * Same as SHA1DCFinal, but convert collision attack case into a verbose die(). + */ +void git_SHA1DCFinal(unsigned char [20], SHA1_CTX *); + +/* + * Same as SHA1DCUpdate, but adjust types to match git's usual interface. + */ +void git_SHA1DCUpdate(SHA1_CTX *ctx, const void *data, unsigned long len); + +#define platform_SHA_CTX SHA1_CTX +#define platform_SHA1_Init SHA1DCInit +#define platform_SHA1_Update git_SHA1DCUpdate +#define platform_SHA1_Final git_SHA1DCFinal + #if defined(__cplusplus) } #endif |