Check PST Password Protection
Contents
[
Hide
]
Aspose.Email - Check PST Password Protection
Microsoft Outlook lets users password protect PST files to restrict access to them. Aspose.Email can detect password protection on a PST file. This page shows how to check a PST for a password and also how to check if the password applied on it is correct.
Java
PersonalStorage pst = PersonalStorage.fromFile(dataDir + "archive.pst");
// The store reports whether a password is set and whether a given one is valid
System.out.println("Password protected: " + pst.getStore().isPasswordProtected());
System.out.println("Password valid: " + pst.getStore().isPasswordValid("Password1"));
Download Running Code
Download Sample Code
For more details, visit Working with PST Password Protection Properties.