Add an internal API to dup in-flight digest context from FD

This commit is contained in:
Panu Matilainen 2017-02-22 12:36:17 +02:00
parent 6c7b85e317
commit 43fecc67a4
2 changed files with 10 additions and 0 deletions

View File

@ -1482,4 +1482,12 @@ void fdFiniDigest(FD_t fd, int id,
}
}
DIGEST_CTX fdDupDigest(FD_t fd, int id)
{
DIGEST_CTX ctx = NULL;
if (fd && fd->digests)
ctx = rpmDigestBundleDupCtx(fd->digests, id);
return ctx;
}

View File

@ -29,6 +29,8 @@ void fdFiniDigest(FD_t fd, int id,
size_t * lenp,
int asAscii);
DIGEST_CTX fdDupDigest(FD_t fd, int id);
/**
* Read an entire file into a buffer.
* @param fn file name to read