- alternatively we could reverse map NSS hash types (HASHContext
knows its type) but shrug...
struct DIGEST_CTX_s {
rpmDigestFlags flags; /*!< Bit(s) to control digest operation. */
HASHContext *hashctx; /*!< Internal NSS hash context. */
+ pgpHashAlgo algo; /*!< Used hash algorithm */
};
DIGEST_CTX
if ((hashctx = HASH_Create(type)) != NULL) {
ctx = xcalloc(1, sizeof(*ctx));
ctx->flags = flags;
+ ctx->algo = hashalgo;
ctx->hashctx = hashctx;
HASH_Begin(ctx->hashctx);
}