Poco::OSP::BundleSign

class SignUtility

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

Digests

typedef std::map < std::string, std::string > Digests;

Maps file names (paths) in a bundle to hash values of their contents.

Member Functions

computeDigest static

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

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

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

static bool isSignatureFile(
    const std::string & path
);

Returns true if and only if the given path references a signature file (META-INF/*.sf or META-INF/*.rsa).