A simple python script for validating PS3 type NPDRM package files.
Standard PS3/PSP/Vita NPDRM PKG files are appended with 32 bytes that the system software uses to verify data integrity. The first 20 bytes of this data is known as the "PackageDigest".
Tools like PSN Update Finder get their sha1sum directly from the PlayStation Network which provides the PackageDigest for comparison. Since this hash is calculated without these bytes, the sha1sum of the entire file obtained through traditional methods will be different.
PKGval attempts to use this information to validate the package. If unavailable it will still calculate the PackageDigest for you.
Typically a PS3 should fail with a "80029564
" error if a retail package is corrupt or the embedded PackageDigest is wrong for some reason. Ergo you may not even find this tool useful, unless you need to validate a package before copying it to your console or using it with your favorite emulator.