IAppxEncryptionFactory5::CreateEncryptedBundleReader2 method (appxpackaging.h)
Important
Some information relates to a prerelease product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a read-only bundle object to which encrypted Windows app packages can be added, with an optional parameter for specifying the expected digest for the encrypted bundle.
Syntax
HRESULT CreateEncryptedBundleReader2(
[in] IStream *inputStream,
[in] const APPX_KEY_INFO *keyInfo,
[in.optional] LPCWSTR expectedDigest,
[out] IAppxBundleReader **bundleReader
);
Parameters
[in] inputStream
A stream for reading the encrypted bundle.
[in] keyInfo
Key info containing the base encryption key and key ID for decrypting the bundle. The base key is used to derive the per file encryption keys. If this parameter is null, the global test key and key ID are used.
[in.optional] expectedDigest
An LPCWSTR containing the expected digest, a hashed representation of the bundle file.
[out] bundleReader
The created bundle reader.
Return value
If the method succeeds, it returns S_OK. Otherwise, it returns an error code that includes, but is not limited to, those in the following table.
Return code | Description |
---|---|
APPX_E_DIGEST_MISMATCH | The digest for the object doesn't match the digest provided in expectedDigest. |
Remarks
Get the digest string for the expecteDigest parameter by calling IAppxDigestProvider::GetDigest.
Requirements
Requirement | Value |
---|---|
Header | appxpackaging.h |