IAppxEncryptionFactory::EncryptPackage method (appxpackaging.h)
Creates an encrypted Windows app package from an unencrypted one.
Syntax
HRESULT EncryptPackage(
[in] IStream *inputStream,
[in] IStream *outputStream,
[in] const APPX_ENCRYPTED_PACKAGE_SETTINGS *settings,
[in] const APPX_KEY_INFO *keyInfo,
const APPX_ENCRYPTED_EXEMPTIONS *exemptedFiles
);
Parameters
[in] inputStream
A readable stream from the app package to be encrypted.
[in] outputStream
A writable stream for writing the resulting encrypted app package.
[in] settings
Settings for creating the package.
[in] keyInfo
Key information containing the base encryption key and key ID. The base key is used to derive the per file encryption keys. If the base key is null, the global test key and key Id are used.
exemptedFiles
The list of files to be exempted from encryption.
Return value
If the method succeeds, it returns S_OK. Otherwise, it returns an error code.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 10, version 1607 [desktop apps only] |
Minimum supported server | Windows Server 2016 [desktop apps only] |
Target Platform | Windows |
Header | appxpackaging.h |