Formats and encryption

edit

PstFile.Format gives the format of a file:

  • Ansi, the format of Outlook 97 to 2002: files up to 2 GB, strings in a code page.
  • Unicode, the format of Outlook 2003 and later.
  • Unicode4K, the format of the offline files (OST) of Outlook 2013 and later: pages of 4 KB and blocks compressed with zlib. IsOfflineFile tells an OST from a PST.

Encryption

PstFile.Encryption gives how the data blocks are obfuscated: Permute (the "compressible encryption" Outlook uses by default), Cyclic ("high encryption") or None. None of them uses a key: the library reads and writes all of them without a password.

Password

The password of a file (HasPassword) is only a check that Outlook does: the file stores a CRC of the password, and its content is not encrypted with it. The library reads a protected file like any other one. Do not rely on the password of a PST file to protect its content.

The files that Windows Information Protection encrypts are not supported: an UnsupportedEmailFeatureException reports them.