mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
shadouble: update for ccan/crypto/sha256 changes.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
94254e7c3f
commit
c46842e0ba
10
shadouble.c
10
shadouble.c
@ -2,12 +2,12 @@
|
||||
|
||||
void sha256_double(struct sha256_double *shadouble, const void *p, size_t len)
|
||||
{
|
||||
sha256(&shadouble->sha, (unsigned char *)p, len);
|
||||
sha256(&shadouble->sha, &shadouble->sha, 1);
|
||||
sha256(&shadouble->sha, p, len);
|
||||
sha256(&shadouble->sha, &shadouble->sha, sizeof(shadouble->sha));
|
||||
}
|
||||
|
||||
void sha256_double_done(struct sha256_ctx *sha256, struct sha256_double *res)
|
||||
void sha256_double_done(struct sha256_ctx *shactx, struct sha256_double *res)
|
||||
{
|
||||
sha256_done(sha256, &res->sha);
|
||||
sha256(&res->sha, &res->sha, 1);
|
||||
sha256_done(shactx, &res->sha);
|
||||
sha256(&res->sha, &res->sha, sizeof(res->sha));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user