2.3.1.16 ProjectPassword

Specifies the password hash of the VBA project.

The syntax of ProjectPassword is defined as follows.

 ProjectPassword    = "DPB=" DQUOTE EncryptedPassword DQUOTE NWLN
  
 EncryptedPassword  = 16*HEXDIG

<EncryptedPassword>: Specifies the password protection for the VBA project.

A VBA project without a password MUST use 0x00 for the Data parameter for Data Encryption (section 2.4.3.2) and the Length parameter MUST be 1.

A VBA project with a password SHOULD specify the password hash of the VBA project, obfuscated by Data Encryption (section 2.4.3.2). The Data parameter for Data Encryption (section 2.4.3.2) MUST be an array of bytes that specifies a Hash Data Structure (section 2.4.4.1) and the Length parameter for Data Encryption MUST be 29. The Hash Data Structure (section 2.4.4.1) specifies a hash key and password hash encoded to remove null bytes as specified by section 2.4.4.

A VBA project with a password MAY<6> specify the plain text password of the VBA project, obfuscated by Data Encryption (section 2.4.3.2). In this case, the Data parameter Data Encryption (section 2.4.3.2) MUST be an array of bytes that specifies a null terminated password string encoded using MBCS using the code page specified by PROJECTCODEPAGE (section 2.3.4.2.1.5), and a Length parameter equal to the number of bytes in the password string including the terminating null character.

When the data specified by <EncryptedPassword> is a password hash, ProjectId.ProjectCLSID (section 2.3.1.2) MUST be "{00000000-0000-0000-0000-000000000000}".