BlockMap

Defines the root element of the app package block map. The BlockMap element specifies the algorithm that is used to compute cryptographic hashes and contains a sequence of File child elements that are associated with each file that is stored in the package.

Element hierarchy

<BlockMap>

Syntax

<BlockMap HashMethod = anyURI >

  <!-- Child elements -->
  File+

</BlockMap>

Key

+ required (one or more)

Attributes and Elements

Attributes

Attribute Description Data type Required Default value
HashMethod

The HashMethod attribute is used to compute the cryptographic hash for each data block.

anyURI Yes

Child Elements

Child Element Description
File

Represents a file contained in the package.

Parent Elements

This outermost (document) element may not be contained by any other elements.

Remarks

The HashMethod attribute specifies the method for computing cryptographic hash of each block of data that is described in the block map. While the schema allows any Uniform Resource Identifier (URI) value to be specified, the value must be a well-known URI defined by World Wide Web Consortium (W3C) for a hash algorithm. Specifically, the following algorithm identifiers are currently supported:

Algorithm Identifier
SHA2-256 http://www.w3.org/2001/04/xmlenc#sha256
SHA2-384 http://www.w3.org/2001/04/xmldsig-more#sha384
SHA2-512 http://www.w3.org/2001/04/xmlenc#sha512

App packages that are created by Visual Studio or the app packager (MakeAppx.exe) utility use the http://www.w3.org/2001/04/xmlenc#sha256 hash algorithm by default.

Note When signing the package, the BlockMap’s HashMethod attribute must also match the file digest hash algorithm (“/fd” parameter) specified to SignTool. For more info, see To sign the package using SignTool.

Requirements

Namespace

http://schemas.microsoft.com/appx/2010/blockmap