mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
c46842e0ba
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 lines
373 B
C
14 lines
373 B
C
#include "shadouble.h"
|
|
|
|
void sha256_double(struct sha256_double *shadouble, const void *p, size_t len)
|
|
{
|
|
sha256(&shadouble->sha, p, len);
|
|
sha256(&shadouble->sha, &shadouble->sha, sizeof(shadouble->sha));
|
|
}
|
|
|
|
void sha256_double_done(struct sha256_ctx *shactx, struct sha256_double *res)
|
|
{
|
|
sha256_done(shactx, &res->sha);
|
|
sha256(&res->sha, &res->sha, sizeof(res->sha));
|
|
}
|