File Information
Library: OSP/BundleSign
Package: BundleSign
Header: Poco/OSP/BundleSign/SignUtility.h
Description
This class is used to compute hash digests for the files in a bundle.
Member Summary
Member Functions: computeDigest, computeDigests, isSignatureFile
Types Aliases
Digests
using Digests = std::map < std::string, std::string >;
Maps file names (paths) in a bundle to hash values of their contents.
Member Functions
computeDigest
static std::string computeDigest(
std::istream & istr,
Poco::DigestEngine & engine
);
Computes a digest for the contents of the given stream, using the given digest engine.
computeDigests
static void computeDigests(
const std::string & bundlePath,
Poco::DigestEngine & engine,
Digests & digests
);
Compute digests, using the given digest engine, for all files stored in the bundle given by bundlePath.
The given bundlePath can be either refer to a bundle file (ZIP archive), or directory.
computeDigests
static void computeDigests(
Poco::OSP::BundleStorage::Ptr pBundleStorage,
Poco::DigestEngine & engine,
Digests & digests
);
Compute digests, using the given digest engine, for all files stored in the bundle given by pBundleStorage.
isSignatureFile
static bool isSignatureFile(
const std::string & path
);
Returns true iff the given path references a signature file (META-INF/*.sf or META-INF/*.rsa).