crypto/digest: simply state in oneshot calculation

cute-signatures
Aydin Mercan 2022-08-10 16:46:01 +03:00
parent 86da6dc599
commit dea8ded23e
Signed by: jaiden
SSH Key Fingerprint: SHA256:vy6hjzotbn/MWZAbjzURNk3NL62EPkjoHsJ5xr/s7nk
1 changed files with 4 additions and 1 deletions

View File

@ -93,7 +93,10 @@ uint8_t apk_digest_from_blob(struct apk_digest *d, apk_blob_t b)
int apk_digest_calc(struct apk_digest *d, uint8_t alg, const void *ptr, size_t sz)
{
union digest_state state;
union {
br_sha1_context sha1;
br_md5_context md5;
} state;
switch (alg) {
case APK_DIGEST_SHA256: