private void OpenPS3Save(string directory) { manager = new Ps3SaveManager(directory, secureFileId); Ps3File file = manager.Files.FirstOrDefault(t => t.PFDEntry.FileName == dataName); byte[] filedata = null; if (file != null) { filedata = file.DecryptToBytes(); } if (filedata == null) { return; } ReadFile(new MemoryStream(filedata)); }
static byte[] Decrypt(String dirpath) { //define the securefile id byte[] key = new byte[] { 0x77, 0x1D, 0x1C, 0x71, 0xE7, 0x5B, 0x4E, 0x70, 0x80, 0x38, 0x73, 0xF7, 0x40, 0x25, 0x11, 0xA7 }; //declare ps3 manager using the directory path, and the secure file id Ps3SaveManager manager = new Ps3SaveManager(dirpath, key); //get file entry using name Ps3File file = manager.Files.FirstOrDefault(t => t.PFDEntry.file_name == "REPLAY.0"); //define byte array that the decrypted data should be allocated byte[] filedata = null; //check if file is not null if (file != null) { filedata = file.DecryptToBytes(); } return(filedata); }
private void OpenPS3Save(Stream pfd, Stream sfo, Stream bin) { //declare ps3 manager using the directory path, and the secure file id manager = new Ps3SaveManager(pfd, sfo, bin, dataName, secureFileId); //get data file entry by name Ps3File file = manager.Files.FirstOrDefault(t => t.PFDEntry.FileName == dataName); byte[] filedata = null; //decrypt file to raw save bytes if (file != null) { filedata = file.DecryptToBytes(); } if (filedata == null) { return; } ReadFile(new MemoryStream(filedata)); }