IAppxEncryptionFactory::EncryptBundle method (appxpackaging.h)

Creates an encrypted Windows app bundle from an unencrypted one.

Syntax

HRESULT EncryptBundle(
  [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 bundle to encrypt.

[in] outputStream

A writable stream for writing the resulting encrypted app bundle.

[in] settings

Settings for creating the bundle.

[in] keyInfo

Key info containing the base encryption key and key ID for encrypting the bundle. The base encryption key is used to derive the per file encryption keys. If this parameter 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

See also

IAppxEncryptionFactory