2 * sha1x.h - Double width SHA-1 as per PGP 5.5
4 * Copyright 2013 Jonathan McDowell <noodles@earth.li>
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
23 #include <nettle/sha.h>
28 #define SHA1X_DIGEST_SIZE (2 * SHA1_DIGEST_SIZE)
31 struct sha1_ctx a, b, c, d;
33 unsigned char result[SHA1X_DIGEST_SIZE];
36 void sha1x_init(struct sha1x_ctx *ctx);
37 void sha1x_update(struct sha1x_ctx *ctx, unsigned length, const uint8_t *data);
38 void sha1x_digest(struct sha1x_ctx *ctx, unsigned length, uint8_t *digest);
40 #endif /* __SHA1X_H__ */