support hash mode4

Ported from cielavenir/psp-savedata-endecrypter