You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
411 B

#include "shadouble.h"
#include "valgrind.h"
void sha256_double(struct sha256_double *shadouble, const void *p, size_t len)
{
sha256(&shadouble->sha, check_mem(p, len), 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));
}