Documented PST password validation functionality not working


#1

Hi,
I am also not able to validate the PST password. I am retrieving the the pst password hash like below.
passwordHash = personalStorage.Store.Properties[MapiPropertyTag.PR_PST_PASSWORD].GetLong();
(it returns value of 2268788557, when pst password is outlook123

Now when I calculate the hash of the same pst password(outlook123), provided in Outlook 2013, the value I am getting is 1689296699, which is different from what I retrieved from PST property PR_PST_PASSWORD above.
I have validated the CRC value on online CRC calculator as well.
https://crccalc.com/?crc=outlook123&method=crc32&datatype=ascii&outtype=dec

Hence, the function isPasswordValid, posted in documentation below is not working as expected
https://docs.aspose.com/display/emailjava/Working+with+PST+Password+Protection+Properties


#2

@amitmohansrivastava,

Can you please share source file along with complete sample code so that we may further investigate to help you out. Also please share which version you are using on your end.


#3

Thanks @Adnan.Ahmad,

Version: Aspose.Email 19.9.0
Using Outlook 2013: PST file \Examples\Data\Outlook\NewPST.pst and setting the password as: test123

Sample code can be downloaded and built using VS 2017.
https://drive.google.com/drive/folders/1g1zq-dYjbjFjsS0_Z7lLkAMAyOfFNE06?usp=sharing

The password of the PST is: test123
Execute the program and its output should be:

PST is protected: True
CalculatedHash of password test123: 4032078523
PasswordHashInPST: 1832418757
Password test123 is not correct

The PST \Examples\Data\Outlook\NewPST.pst opens fine when using Outlook, with password test123


#4

@amitmohansrivastava,

I have observed the issue shared by you and an issue with ID EMAILNET-39629 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.