JNUSLib icon indicating copy to clipboard operation
JNUSLib copied to clipboard

CheckSumWrongException: hash checksum failed

Open BullyWiiPlaza opened this issue 5 years ago • 0 comments

Downloading decrypted FST entries does not work with the latest commit hash 15a1df1:

val downloadsDirectory = Paths.get("Downloads");
Files.createDirectories(downloadsDirectory);
val commonKey = StringToByteArray("...");

val titleId = 0x0005000E12345678L;
val titleIdDirectory = downloadsDirectory.resolve(Long.toHexString(titleId).toUpperCase());
Files.createDirectories(titleIdDirectory);
val nusTitle = NUSTitleLoaderRemote.loadNUSTitle(titleId, commonKey);

val fstDataProvider = new FSTDataProviderNUSTitle(nusTitle);
val decryptionService = DecryptionService.getInstance(fstDataProvider);
decryptionService.decryptAllFSTEntriesTo(titleIdDirectory.toString(), true);

Exception:

Exception in thread "main" java.io.IOException: de.mas.wiiu.jnus.utils.CheckSumWrongException: hash checksum failed 
    at de.mas.wiiu.jnus.implementations.DefaultNUSDataProcessor.readPlainDecryptedContentToStream(DefaultNUSDataProcessor.java:195)
    at de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle.readFileToStream(FSTDataProviderNUSTitle.java:75)
    at de.mas.wiiu.jnus.interfaces.FSTDataProvider.readFile(FSTDataProvider.java:40)
    at de.mas.wiiu.jnus.interfaces.FSTDataProvider.readFile(FSTDataProvider.java:34)
    at Main.main(Main.java:53)
Caused by: de.mas.wiiu.jnus.utils.CheckSumWrongException: hash checksum failed 
    at de.mas.wiiu.jnus.implementations.DefaultNUSDataProcessor.processNonHashedStream(DefaultNUSDataProcessor.java:279)
    at de.mas.wiiu.jnus.implementations.DefaultNUSDataProcessor.readPlainDecryptedContentToStream(DefaultNUSDataProcessor.java:193)
    ... 4 more

With commit hash 4ebd981 it works fine.

BullyWiiPlaza avatar Nov 07 '20 23:11 BullyWiiPlaza