检查 PST 密码保护
Contents
[
Hide
]
Aspose.Email - 检查 PST 密码保护
Microsoft Outlook 允许用户对 PST 文件进行密码保护,以限制访问。Aspose.Email 可以检测 PST 文件的密码保护。本页面展示了如何检查 PST 是否设置了密码,以及如何验证密码是否正确。
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"));
下载运行代码
下载示例代码
欲了解更多细节,请访问 使用 PST 密码保护属性.