Compare commits
	
		
			2 commits
		
	
	
		
			6e4e4dd3e7
			...
			1f25e917c3
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
							 | 
						1f25e917c3 | ||
| 
							 | 
						394bc8f226 | 
					 73 changed files with 167 additions and 179 deletions
				
			
		| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
package libKonogonka;
 | 
					package libKonogonka.aesctr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.BufferedInputStream;
 | 
					import java.io.BufferedInputStream;
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
| 
						 | 
					@ -18,8 +18,6 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.aesctr;
 | 
					package libKonogonka.aesctr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.IProducer;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.BufferedInputStream;
 | 
					import java.io.BufferedInputStream;
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
import java.io.InputStream;
 | 
					import java.io.InputStream;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,8 +18,6 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.aesctr;
 | 
					package libKonogonka.aesctr;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.IProducer;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.BufferedInputStream;
 | 
					import java.io.BufferedInputStream;
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
import java.nio.file.Files;
 | 
					import java.nio.file.Files;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
package libKonogonka.Tools;
 | 
					package libKonogonka.fs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.BufferedInputStream;
 | 
					import java.io.BufferedInputStream;
 | 
				
			||||||
import java.io.BufferedOutputStream;
 | 
					import java.io.BufferedOutputStream;
 | 
				
			||||||
| 
						 | 
					@ -16,18 +16,19 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools;
 | 
					package libKonogonka.fs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
 | 
					import java.io.FileNotFoundException;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Any class of this type must provide streams
 | 
					 * Any class of this type must provide streams
 | 
				
			||||||
 * */
 | 
					 * */
 | 
				
			||||||
public interface ISuperProvider {
 | 
					public interface ISuperProvider {
 | 
				
			||||||
    InFileStreamProducer getStreamProducer(String subFileName) throws Exception;
 | 
					    InFileStreamProducer getStreamProducer(String subFileName) throws Exception;
 | 
				
			||||||
    InFileStreamProducer getStreamProducer(int subFileNumber) throws Exception;
 | 
					    InFileStreamProducer getStreamProducer(int subFileNumber) throws FileNotFoundException;
 | 
				
			||||||
    boolean exportContent(String saveToLocation, String subFileName) throws Exception;
 | 
					    boolean exportContent(String saveToLocation, String subFileName) throws Exception;
 | 
				
			||||||
    boolean exportContent(String saveToLocation, int subFileNumber) throws Exception;
 | 
					    boolean exportContent(String saveToLocation, int subFileNumber) throws Exception;
 | 
				
			||||||
    File getFile();
 | 
					    File getFile();
 | 
				
			||||||
| 
						 | 
					@ -16,11 +16,11 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NCA;
 | 
					package libKonogonka.fs.NCA;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCASectionTableBlock.NcaFsHeader;
 | 
					import libKonogonka.fs.NCA.NCASectionTableBlock.NcaFsHeader;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0Provider;
 | 
					import libKonogonka.fs.PFS0.PFS0Provider;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
					import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
					import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NCA;
 | 
					package libKonogonka.fs.NCA;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,10 +16,10 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NCA;
 | 
					package libKonogonka.fs.NCA;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCASectionTableBlock.NcaFsHeader;
 | 
					import libKonogonka.fs.NCA.NCASectionTableBlock.NcaFsHeader;
 | 
				
			||||||
import libKonogonka.exceptions.EmptySectionException;
 | 
					import libKonogonka.exceptions.EmptySectionException;
 | 
				
			||||||
import libKonogonka.xtsaes.XTSAESCipher;
 | 
					import libKonogonka.xtsaes.XTSAESCipher;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.nio.charset.StandardCharsets;
 | 
					import java.nio.charset.StandardCharsets;
 | 
				
			||||||
import java.util.Arrays;
 | 
					import java.util.Arrays;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NCA.NCASectionTableBlock;
 | 
					package libKonogonka.fs.NCA.NCASectionTableBlock;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Arrays;
 | 
					import java.util.Arrays;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,10 +16,10 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM.ACI0;
 | 
					package libKonogonka.fs.NPDM.ACI0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.NPDM.KernelAccessControlProvider;
 | 
					import libKonogonka.fs.NPDM.KernelAccessControlProvider;
 | 
				
			||||||
import libKonogonka.Tools.NPDM.ServiceAccessControlProvider;
 | 
					import libKonogonka.fs.NPDM.ServiceAccessControlProvider;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.nio.charset.StandardCharsets;
 | 
					import java.nio.charset.StandardCharsets;
 | 
				
			||||||
import java.util.Arrays;
 | 
					import java.util.Arrays;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM.ACI0;
 | 
					package libKonogonka.fs.NPDM.ACI0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,10 +16,10 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM.ACID;
 | 
					package libKonogonka.fs.NPDM.ACID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.NPDM.KernelAccessControlProvider;
 | 
					import libKonogonka.fs.NPDM.KernelAccessControlProvider;
 | 
				
			||||||
import libKonogonka.Tools.NPDM.ServiceAccessControlProvider;
 | 
					import libKonogonka.fs.NPDM.ServiceAccessControlProvider;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.nio.charset.StandardCharsets;
 | 
					import java.nio.charset.StandardCharsets;
 | 
				
			||||||
import java.util.Arrays;
 | 
					import java.util.Arrays;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM.ACID;
 | 
					package libKonogonka.fs.NPDM.ACID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM;
 | 
					package libKonogonka.fs.NPDM;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -88,7 +88,7 @@ public class KernelAccessControlProvider {
 | 
				
			||||||
                             DEBUGFLAGS = 16;
 | 
					                             DEBUGFLAGS = 16;
 | 
				
			||||||
    // RAW data
 | 
					    // RAW data
 | 
				
			||||||
    private final LinkedList<Integer> rawData;
 | 
					    private final LinkedList<Integer> rawData;
 | 
				
			||||||
    private byte[] raw;
 | 
					    private final byte[] raw;
 | 
				
			||||||
    // Kernel flags
 | 
					    // Kernel flags
 | 
				
			||||||
    private boolean kernelFlagsAvailable;
 | 
					    private boolean kernelFlagsAvailable;
 | 
				
			||||||
    private int kernelFlagCpuIdHi;
 | 
					    private int kernelFlagCpuIdHi;
 | 
				
			||||||
| 
						 | 
					@ -16,10 +16,10 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM;
 | 
					package libKonogonka.fs.NPDM;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.NPDM.ACI0.ACI0Provider;
 | 
					import libKonogonka.fs.NPDM.ACI0.ACI0Provider;
 | 
				
			||||||
import libKonogonka.Tools.NPDM.ACID.ACIDProvider;
 | 
					import libKonogonka.fs.NPDM.ACID.ACIDProvider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.BufferedInputStream;
 | 
					import java.io.BufferedInputStream;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.NPDM;
 | 
					package libKonogonka.fs.NPDM;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.nio.charset.StandardCharsets;
 | 
					import java.nio.charset.StandardCharsets;
 | 
				
			||||||
import java.util.LinkedHashMap;
 | 
					import java.util.LinkedHashMap;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NSO;
 | 
					package libKonogonka.fs.NSO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NSO;
 | 
					package libKonogonka.fs.NSO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NSO;
 | 
					package libKonogonka.fs.NSO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class NSO0Raw {
 | 
					public class NSO0Raw {
 | 
				
			||||||
    private NSO0Header headerObject;
 | 
					    private NSO0Header headerObject;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NSO;
 | 
					package libKonogonka.fs.NSO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import net.jpountz.lz4.LZ4Factory;
 | 
					import net.jpountz.lz4.LZ4Factory;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NSO;
 | 
					package libKonogonka.fs.NSO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.NSO;
 | 
					package libKonogonka.fs.NSO;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.PFS0;
 | 
					package libKonogonka.fs.PFS0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,12 +16,12 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.PFS0;
 | 
					package libKonogonka.fs.PFS0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
import libKonogonka.Tools.ExportAble;
 | 
					import libKonogonka.fs.ExportAble;
 | 
				
			||||||
import libKonogonka.Tools.ISuperProvider;
 | 
					import libKonogonka.fs.ISuperProvider;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCASectionTableBlock.SuperBlockPFS0;
 | 
					import libKonogonka.fs.NCA.NCASectionTableBlock.SuperBlockPFS0;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
import org.apache.logging.log4j.Logger;
 | 
					import org.apache.logging.log4j.Logger;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.PFS0;
 | 
					package libKonogonka.fs.PFS0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class PFS0subFile {
 | 
					public class PFS0subFile {
 | 
				
			||||||
    private final String name;
 | 
					    private final String name;
 | 
				
			||||||
| 
						 | 
					@ -17,10 +17,10 @@
 | 
				
			||||||
 * along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					 * along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package libKonogonka.Tools.RomFs;
 | 
					package libKonogonka.fs.RomFs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.view.FileSystemTreeViewMaker;
 | 
					import libKonogonka.fs.RomFs.view.FileSystemTreeViewMaker;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
import org.apache.logging.log4j.Logger;
 | 
					import org.apache.logging.log4j.Logger;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -17,7 +17,7 @@
 | 
				
			||||||
 * along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					 * along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package libKonogonka.Tools.RomFs;
 | 
					package libKonogonka.fs.RomFs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.RomFs;
 | 
					package libKonogonka.fs.RomFs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
| 
						 | 
					@ -16,11 +16,11 @@
 | 
				
			||||||
 * You should have received a copy of the GNU General Public License
 | 
					 * You should have received a copy of the GNU General Public License
 | 
				
			||||||
 * along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					 * along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.RomFs;
 | 
					package libKonogonka.fs.RomFs;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.ExportAble;
 | 
					import libKonogonka.fs.ExportAble;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.view.DirectoryMetaTablePlainView;
 | 
					import libKonogonka.fs.RomFs.view.DirectoryMetaTablePlainView;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.view.FileMetaTablePlainView;
 | 
					import libKonogonka.fs.RomFs.view.FileMetaTablePlainView;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
import org.apache.logging.log4j.Logger;
 | 
					import org.apache.logging.log4j.Logger;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.RomFs.view;
 | 
					package libKonogonka.fs.RomFs.view;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.RomFs.view;
 | 
					package libKonogonka.fs.RomFs.view;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,9 +16,9 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.RomFs.view;
 | 
					package libKonogonka.fs.RomFs.view;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.TIK;
 | 
					package libKonogonka.fs.TIK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.BufferedInputStream;
 | 
					import java.io.BufferedInputStream;
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.XCI;
 | 
					package libKonogonka.fs.XCI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class HFS0File {
 | 
					public class HFS0File {
 | 
				
			||||||
    private final String name;
 | 
					    private final String name;
 | 
				
			||||||
| 
						 | 
					@ -16,10 +16,10 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.XCI;
 | 
					package libKonogonka.fs.XCI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.ExportAble;
 | 
					import libKonogonka.fs.ExportAble;
 | 
				
			||||||
import libKonogonka.Tools.ISuperProvider;
 | 
					import libKonogonka.fs.ISuperProvider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
import org.apache.logging.log4j.Logger;
 | 
					import org.apache.logging.log4j.Logger;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.XCI;
 | 
					package libKonogonka.fs.XCI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.XCI;
 | 
					package libKonogonka.fs.XCI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.XCI;
 | 
					package libKonogonka.fs.XCI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import javax.crypto.Cipher;
 | 
					import javax.crypto.Cipher;
 | 
				
			||||||
import javax.crypto.spec.IvParameterSpec;
 | 
					import javax.crypto.spec.IvParameterSpec;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
*/
 | 
					*/
 | 
				
			||||||
package libKonogonka.Tools.XCI;
 | 
					package libKonogonka.fs.XCI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
import java.io.FileNotFoundException;
 | 
					import java.io.FileNotFoundException;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2;
 | 
					package libKonogonka.fs.other.System2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2;
 | 
					package libKonogonka.fs.other.System2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,11 +16,11 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2;
 | 
					package libKonogonka.fs.other.System2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.ExportAble;
 | 
					import libKonogonka.fs.ExportAble;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.ini1.Ini1Provider;
 | 
					import libKonogonka.fs.other.System2.ini1.Ini1Provider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
					import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2.ini1;
 | 
					package libKonogonka.fs.other.System2.ini1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
| 
						 | 
					@ -16,10 +16,10 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2.ini1;
 | 
					package libKonogonka.fs.other.System2.ini1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.ExportAble;
 | 
					import libKonogonka.fs.ExportAble;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.System2Header;
 | 
					import libKonogonka.fs.other.System2.System2Header;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
					import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
| 
						 | 
					@ -16,12 +16,12 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2.ini1;
 | 
					package libKonogonka.fs.other.System2.ini1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
import libKonogonka.Tools.NPDM.KernelAccessControlProvider;
 | 
					import libKonogonka.fs.NPDM.KernelAccessControlProvider;
 | 
				
			||||||
import libKonogonka.Tools.NSO.SegmentHeader;
 | 
					import libKonogonka.fs.NSO.SegmentHeader;
 | 
				
			||||||
import org.apache.logging.log4j.LogManager;
 | 
					import org.apache.logging.log4j.LogManager;
 | 
				
			||||||
import org.apache.logging.log4j.Logger;
 | 
					import org.apache.logging.log4j.Logger;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,9 +16,9 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2.ini1;
 | 
					package libKonogonka.fs.other.System2.ini1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.ExportAble;
 | 
					import libKonogonka.fs.ExportAble;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
					import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.nio.file.Paths;
 | 
					import java.nio.file.Paths;
 | 
				
			||||||
| 
						 | 
					@ -16,7 +16,7 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2.ini1;
 | 
					package libKonogonka.fs.other.System2.ini1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.nio.ByteBuffer;
 | 
					import java.nio.ByteBuffer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,9 +16,9 @@
 | 
				
			||||||
    You should have received a copy of the GNU General Public License
 | 
					    You should have received a copy of the GNU General Public License
 | 
				
			||||||
    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
					    along with libKonogonka.  If not, see <https://www.gnu.org/licenses/>.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.Tools.other.System2.ini1;
 | 
					package libKonogonka.fs.other.System2.ini1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.NSO.SegmentHeader;
 | 
					import libKonogonka.fs.NSO.SegmentHeader;
 | 
				
			||||||
import libKonogonka.blz.BlzDecompress;
 | 
					import libKonogonka.blz.BlzDecompress;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
					import libKonogonka.aesctr.InFileStreamClassicProducer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,7 @@ import java.nio.ByteBuffer;
 | 
				
			||||||
import java.nio.ByteOrder;
 | 
					import java.nio.ByteOrder;
 | 
				
			||||||
import java.nio.charset.StandardCharsets;
 | 
					import java.nio.charset.StandardCharsets;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static libKonogonka.Tools.other.System2.ini1.KIP1Provider.HEADER_SIZE;
 | 
					import static libKonogonka.fs.other.System2.ini1.KIP1Provider.HEADER_SIZE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class Kip1Unpacker {
 | 
					public class Kip1Unpacker {
 | 
				
			||||||
    private static final String DECOMPRESSED_FILE_POSTFIX = "_decompressed";
 | 
					    private static final String DECOMPRESSED_FILE_POSTFIX = "_decompressed";
 | 
				
			||||||
| 
						 | 
					@ -42,7 +42,6 @@ public class Kip1Unpacker {
 | 
				
			||||||
    private byte[] _rwDataDecompressedSection;
 | 
					    private byte[] _rwDataDecompressedSection;
 | 
				
			||||||
    private int textFileOffsetNew;
 | 
					    private int textFileOffsetNew;
 | 
				
			||||||
    private int roDataFileOffsetNew;
 | 
					    private int roDataFileOffsetNew;
 | 
				
			||||||
    private int rwDataFileOffsetNew;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    private Kip1Unpacker(KIP1Header kip1Header, InFileStreamClassicProducer producer) throws Exception{
 | 
					    private Kip1Unpacker(KIP1Header kip1Header, InFileStreamClassicProducer producer) throws Exception{
 | 
				
			||||||
        this.kip1Header = kip1Header;
 | 
					        this.kip1Header = kip1Header;
 | 
				
			||||||
| 
						 | 
					@ -150,7 +149,7 @@ public class Kip1Unpacker {
 | 
				
			||||||
    private void makeHeader(){
 | 
					    private void makeHeader(){
 | 
				
			||||||
        textFileOffsetNew = kip1Header.getTextSegmentHeader().getMemoryOffset();
 | 
					        textFileOffsetNew = kip1Header.getTextSegmentHeader().getMemoryOffset();
 | 
				
			||||||
        roDataFileOffsetNew = kip1Header.getRoDataSegmentHeader().getMemoryOffset();
 | 
					        roDataFileOffsetNew = kip1Header.getRoDataSegmentHeader().getMemoryOffset();
 | 
				
			||||||
        rwDataFileOffsetNew = kip1Header.getRwDataSegmentHeader().getMemoryOffset();
 | 
					        int rwDataFileOffsetNew = kip1Header.getRwDataSegmentHeader().getMemoryOffset();
 | 
				
			||||||
        byte flags = kip1Header.getFlags();
 | 
					        byte flags = kip1Header.getFlags();
 | 
				
			||||||
        flags &= ~0b111; //mark .text .ro .rw as 'not compress'
 | 
					        flags &= ~0b111; //mark .text .ro .rw as 'not compress'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -34,10 +34,8 @@ import java.util.function.LongFunction;
 | 
				
			||||||
 * XTS-AES cipher with arbitrary (non 128-bit aligned) data unit lengths.
 | 
					 * XTS-AES cipher with arbitrary (non 128-bit aligned) data unit lengths.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @author Ahseya
 | 
					 * @author Ahseya
 | 
				
			||||||
 */
 | 
					 *
 | 
				
			||||||
 | 
					 * Class updated for NCAs usage.
 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
* Updated for special usage by Dmitry Isaenko.
 | 
					 | 
				
			||||||
* */
 | 
					* */
 | 
				
			||||||
@NotThreadSafe
 | 
					@NotThreadSafe
 | 
				
			||||||
public class XTSAESCipher {
 | 
					public class XTSAESCipher {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@ package libKonogonka.xtsaes;
 | 
				
			||||||
import net.jcip.annotations.NotThreadSafe;
 | 
					import net.jcip.annotations.NotThreadSafe;
 | 
				
			||||||
import org.bouncycastle.crypto.BlockCipher;
 | 
					import org.bouncycastle.crypto.BlockCipher;
 | 
				
			||||||
import org.bouncycastle.crypto.DataLengthException;
 | 
					import org.bouncycastle.crypto.DataLengthException;
 | 
				
			||||||
import org.bouncycastle.crypto.engines.AESFastEngine;
 | 
					import org.bouncycastle.crypto.engines.AESEngine;
 | 
				
			||||||
import org.bouncycastle.crypto.params.KeyParameter;
 | 
					import org.bouncycastle.crypto.params.KeyParameter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Arrays;
 | 
					import java.util.Arrays;
 | 
				
			||||||
| 
						 | 
					@ -36,10 +36,8 @@ import java.util.Objects;
 | 
				
			||||||
 * XTS core functions.
 | 
					 * XTS core functions.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @author Ahseya
 | 
					 * @author Ahseya
 | 
				
			||||||
 */
 | 
					 *
 | 
				
			||||||
 | 
					 * Class updated for NCAs usage.
 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Updated for special usage by Dmitry Isaenko.
 | 
					 | 
				
			||||||
 * */
 | 
					 * */
 | 
				
			||||||
@NotThreadSafe
 | 
					@NotThreadSafe
 | 
				
			||||||
class XTSCore {
 | 
					class XTSCore {
 | 
				
			||||||
| 
						 | 
					@ -56,7 +54,7 @@ class XTSCore {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XTSCore(XTSTweak tweak) {
 | 
					    XTSCore(XTSTweak tweak) {
 | 
				
			||||||
        this(new AESFastEngine(), tweak);
 | 
					        this(new AESEngine(), tweak);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XTSCore(boolean isDefault) {
 | 
					    XTSCore(boolean isDefault) {
 | 
				
			||||||
| 
						 | 
					@ -64,7 +62,7 @@ class XTSCore {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XTSCore init(boolean forEncryption, KeyParameter key) throws IllegalArgumentException {
 | 
					    XTSCore init(boolean forEncryption, KeyParameter key) throws IllegalArgumentException {
 | 
				
			||||||
        byte[] k = ((KeyParameter) key).getKey();
 | 
					        byte[] k = key.getKey();
 | 
				
			||||||
        if (k.length != 32 && k.length != 64) {
 | 
					        if (k.length != 32 && k.length != 64) {
 | 
				
			||||||
            throw new IllegalArgumentException("bad key length: " + k.length);
 | 
					            throw new IllegalArgumentException("bad key length: " + k.length);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -26,7 +26,7 @@ package libKonogonka.xtsaes;
 | 
				
			||||||
import net.jcip.annotations.NotThreadSafe;
 | 
					import net.jcip.annotations.NotThreadSafe;
 | 
				
			||||||
import org.bouncycastle.crypto.BlockCipher;
 | 
					import org.bouncycastle.crypto.BlockCipher;
 | 
				
			||||||
import org.bouncycastle.crypto.DataLengthException;
 | 
					import org.bouncycastle.crypto.DataLengthException;
 | 
				
			||||||
import org.bouncycastle.crypto.engines.AESFastEngine;
 | 
					import org.bouncycastle.crypto.engines.AESEngine;
 | 
				
			||||||
import org.bouncycastle.crypto.params.KeyParameter;
 | 
					import org.bouncycastle.crypto.params.KeyParameter;
 | 
				
			||||||
import org.bouncycastle.util.Pack;
 | 
					import org.bouncycastle.util.Pack;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,29 +38,11 @@ import java.util.function.LongFunction;
 | 
				
			||||||
 * XTS tweak with pluggable tweak function.
 | 
					 * XTS tweak with pluggable tweak function.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @author Ahseya
 | 
					 * @author Ahseya
 | 
				
			||||||
 */
 | 
					 *
 | 
				
			||||||
 | 
					 * Class updated for NCAs usage.
 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * Updated for special usage by Dmitry Isaenko.
 | 
					 | 
				
			||||||
 * */
 | 
					 * */
 | 
				
			||||||
@NotThreadSafe
 | 
					@NotThreadSafe
 | 
				
			||||||
class XTSTweak {
 | 
					class XTSTweak {
 | 
				
			||||||
    static byte[] nintTweakFunction(long tweakValue) {
 | 
					 | 
				
			||||||
        byte[] bs = new byte[BLOCK_SIZE];
 | 
					 | 
				
			||||||
        byte[] twk = Pack.longToBigEndian(tweakValue);
 | 
					 | 
				
			||||||
        int j = BLOCK_SIZE - twk.length;
 | 
					 | 
				
			||||||
        for (byte b: twk){
 | 
					 | 
				
			||||||
            bs[j++] = b;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        return bs;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    static byte[] defaultTweakFunction(long tweakValue) {
 | 
					 | 
				
			||||||
        byte[] bs = Pack.longToLittleEndian(tweakValue);
 | 
					 | 
				
			||||||
        bs = Arrays.copyOfRange(bs, 0, BLOCK_SIZE);
 | 
					 | 
				
			||||||
        return bs;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    private static final long FDBK = 0x87;
 | 
					    private static final long FDBK = 0x87;
 | 
				
			||||||
    private static final long MSB = 0x8000000000000000L;
 | 
					    private static final long MSB = 0x8000000000000000L;
 | 
				
			||||||
    private static final int BLOCK_SIZE = 16;
 | 
					    private static final int BLOCK_SIZE = 16;
 | 
				
			||||||
| 
						 | 
					@ -84,7 +66,7 @@ class XTSTweak {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XTSTweak(LongFunction<byte[]> tweakFunction) {
 | 
					    XTSTweak(LongFunction<byte[]> tweakFunction) {
 | 
				
			||||||
        this(new AESFastEngine(), tweakFunction);
 | 
					        this(new AESEngine(), tweakFunction);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XTSTweak(boolean isDefault) {
 | 
					    XTSTweak(boolean isDefault) {
 | 
				
			||||||
| 
						 | 
					@ -92,6 +74,20 @@ class XTSTweak {
 | 
				
			||||||
                ? XTSTweak::defaultTweakFunction
 | 
					                ? XTSTweak::defaultTweakFunction
 | 
				
			||||||
                : XTSTweak::nintTweakFunction);
 | 
					                : XTSTweak::nintTweakFunction);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    static byte[] defaultTweakFunction(long tweakValue) {
 | 
				
			||||||
 | 
					        byte[] bs = Pack.longToLittleEndian(tweakValue);
 | 
				
			||||||
 | 
					        bs = Arrays.copyOfRange(bs, 0, BLOCK_SIZE);
 | 
				
			||||||
 | 
					        return bs;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    static byte[] nintTweakFunction(long tweakValue) {
 | 
				
			||||||
 | 
					        byte[] bs = new byte[BLOCK_SIZE];
 | 
				
			||||||
 | 
					        byte[] twk = Pack.longToBigEndian(tweakValue);
 | 
				
			||||||
 | 
					        int j = BLOCK_SIZE - twk.length;
 | 
				
			||||||
 | 
					        for (byte b: twk){
 | 
				
			||||||
 | 
					            bs[j++] = b;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        return bs;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    XTSTweak init(KeyParameter key) throws IllegalArgumentException {
 | 
					    XTSTweak init(KeyParameter key) throws IllegalArgumentException {
 | 
				
			||||||
        cipher.init(true, key);
 | 
					        cipher.init(true, key);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,9 +2,9 @@ package libKonogonka.package2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import org.junit.jupiter.api.*;
 | 
					import org.junit.jupiter.api.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.File;
 | 
					import java.io.File;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,11 +2,11 @@ package libKonogonka.package2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.System2Provider;
 | 
					import libKonogonka.fs.other.System2.System2Provider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.ini1.Ini1Provider;
 | 
					import libKonogonka.fs.other.System2.ini1.Ini1Provider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.junit.jupiter.api.Assertions;
 | 
					import org.junit.jupiter.api.Assertions;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,10 +2,10 @@ package libKonogonka.package2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.System2Provider;
 | 
					import libKonogonka.fs.other.System2.System2Provider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.junit.jupiter.api.*;
 | 
					import org.junit.jupiter.api.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,12 +2,12 @@ package libKonogonka.package2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.System2Provider;
 | 
					import libKonogonka.fs.other.System2.System2Provider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.ini1.Ini1Provider;
 | 
					import libKonogonka.fs.other.System2.ini1.Ini1Provider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.ini1.KIP1Provider;
 | 
					import libKonogonka.fs.other.System2.ini1.KIP1Provider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.junit.jupiter.api.Assertions;
 | 
					import org.junit.jupiter.api.Assertions;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,12 +2,12 @@ package libKonogonka.package2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Converter;
 | 
					import libKonogonka.Converter;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.System2Provider;
 | 
					import libKonogonka.fs.other.System2.System2Provider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.ini1.Ini1Provider;
 | 
					import libKonogonka.fs.other.System2.ini1.Ini1Provider;
 | 
				
			||||||
import libKonogonka.Tools.other.System2.ini1.KIP1Provider;
 | 
					import libKonogonka.fs.other.System2.ini1.KIP1Provider;
 | 
				
			||||||
import libKonogonka.aesctr.InFileStreamProducer;
 | 
					import libKonogonka.aesctr.InFileStreamProducer;
 | 
				
			||||||
import org.junit.jupiter.api.Assertions;
 | 
					import org.junit.jupiter.api.Assertions;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,9 +19,9 @@
 | 
				
			||||||
package libKonogonka.unsorted;
 | 
					package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.NSO.NSO0Provider;
 | 
					import libKonogonka.fs.NSO.NSO0Provider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0Provider;
 | 
					import libKonogonka.fs.PFS0.PFS0Provider;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -54,31 +54,31 @@ public class KeyChainHolderTest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void printKAKApplication(){
 | 
					    void printKAKApplication(){
 | 
				
			||||||
        System.out.println("-=== key_area_key_application test ===-");
 | 
					        System.out.println("-=== key_area_key_application test ===-");
 | 
				
			||||||
        for (Map.Entry entry : keyChainHolder.getKey_area_key_application().entrySet()){
 | 
					        for (Map.Entry<String, String> entry : keyChainHolder.getKey_area_key_application().entrySet()){
 | 
				
			||||||
            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
					            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    void printKAKOcean(){
 | 
					    void printKAKOcean(){
 | 
				
			||||||
        System.out.println("-=== key_area_key_ocean test ===-");
 | 
					        System.out.println("-=== key_area_key_ocean test ===-");
 | 
				
			||||||
        for (Map.Entry entry : keyChainHolder.getKey_area_key_ocean().entrySet()){
 | 
					        for (Map.Entry<String, String> entry : keyChainHolder.getKey_area_key_ocean().entrySet()){
 | 
				
			||||||
            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
					            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    void printKAKSystem(){
 | 
					    void printKAKSystem(){
 | 
				
			||||||
        System.out.println("-=== key_area_key_system test ===-");
 | 
					        System.out.println("-=== key_area_key_system test ===-");
 | 
				
			||||||
        for (Map.Entry entry : keyChainHolder.getKey_area_key_system().entrySet()){
 | 
					        for (Map.Entry<String, String> entry : keyChainHolder.getKey_area_key_system().entrySet()){
 | 
				
			||||||
            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
					            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    void printKAKTitleKek(){
 | 
					    void printKAKTitleKek(){
 | 
				
			||||||
        System.out.println("-=== titlekek test ===-");
 | 
					        System.out.println("-=== titlekek test ===-");
 | 
				
			||||||
        for (Map.Entry entry : keyChainHolder.getTitlekek().entrySet()){
 | 
					        for (Map.Entry<String, String> entry : keyChainHolder.getTitlekek().entrySet()){
 | 
				
			||||||
            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
					            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    void printRawKeySet(){
 | 
					    void printRawKeySet(){
 | 
				
			||||||
        System.out.println("-=== Raw Key Set (everything) test ===-");
 | 
					        System.out.println("-=== Raw Key Set (everything) test ===-");
 | 
				
			||||||
        for (Map.Entry entry : keyChainHolder.getRawKeySet().entrySet()){
 | 
					        for (Map.Entry<String, String> entry : keyChainHolder.getRawKeySet().entrySet()){
 | 
				
			||||||
            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
					            System.out.println(entry.getKey() + " - " + entry.getValue());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,7 +19,7 @@
 | 
				
			||||||
package libKonogonka.unsorted;
 | 
					package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import org.junit.jupiter.api.*;
 | 
					import org.junit.jupiter.api.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.BufferedReader;
 | 
					import java.io.BufferedReader;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -18,7 +18,7 @@
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
package libKonogonka.unsorted;
 | 
					package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.NSO.NSO0Provider;
 | 
					import libKonogonka.fs.NSO.NSO0Provider;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,10 +20,10 @@ package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.NSO.NSO0Provider;
 | 
					import libKonogonka.fs.NSO.NSO0Provider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0Provider;
 | 
					import libKonogonka.fs.PFS0.PFS0Provider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0subFile;
 | 
					import libKonogonka.fs.PFS0.PFS0subFile;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,9 +21,9 @@ package libKonogonka.unsorted;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
import libKonogonka.TitleKeyChainHolder;
 | 
					import libKonogonka.TitleKeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0Provider;
 | 
					import libKonogonka.fs.PFS0.PFS0Provider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0subFile;
 | 
					import libKonogonka.fs.PFS0.PFS0subFile;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
					import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
					import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
| 
						 | 
					@ -209,7 +209,7 @@ public class NSPpfs0EncryptedTest {
 | 
				
			||||||
    private void exportContentLegacy(PFS0subFile entry, String saveToLocation) throws Exception {
 | 
					    private void exportContentLegacy(PFS0subFile entry, String saveToLocation) throws Exception {
 | 
				
			||||||
        File contentFile = new File(saveToLocation + entry.getName());
 | 
					        File contentFile = new File(saveToLocation + entry.getName());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        BufferedOutputStream extractedFileBOS = new BufferedOutputStream(new FileOutputStream(contentFile));
 | 
					        BufferedOutputStream extractedFileBOS = new BufferedOutputStream(Files.newOutputStream(contentFile.toPath()));
 | 
				
			||||||
        BufferedInputStream pis = ncaProvider.getNCAContentProvider(0)
 | 
					        BufferedInputStream pis = ncaProvider.getNCAContentProvider(0)
 | 
				
			||||||
                .getPfs0()
 | 
					                .getPfs0()
 | 
				
			||||||
                .getStreamProducer(entry.getName())
 | 
					                .getStreamProducer(entry.getName())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,8 +20,8 @@ package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.TitleKeyChainHolder;
 | 
					import libKonogonka.TitleKeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0Provider;
 | 
					import libKonogonka.fs.PFS0.PFS0Provider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0subFile;
 | 
					import libKonogonka.fs.PFS0.PFS0subFile;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,9 +20,9 @@ package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0Provider;
 | 
					import libKonogonka.fs.PFS0.PFS0Provider;
 | 
				
			||||||
import libKonogonka.Tools.PFS0.PFS0subFile;
 | 
					import libKonogonka.fs.PFS0.PFS0subFile;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
					import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
					import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
				
			||||||
import org.junit.jupiter.api.*;
 | 
					import org.junit.jupiter.api.*;
 | 
				
			||||||
| 
						 | 
					@ -183,7 +183,7 @@ public class Pfs0EncryptedTest {
 | 
				
			||||||
    private void exportContentLegacy(PFS0subFile entry, String saveToLocation) throws Exception {
 | 
					    private void exportContentLegacy(PFS0subFile entry, String saveToLocation) throws Exception {
 | 
				
			||||||
        File contentFile = new File(saveToLocation + entry.getName());
 | 
					        File contentFile = new File(saveToLocation + entry.getName());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        BufferedOutputStream extractedFileBOS = new BufferedOutputStream(new FileOutputStream(contentFile));
 | 
					        BufferedOutputStream extractedFileBOS = new BufferedOutputStream(Files.newOutputStream(contentFile.toPath()));
 | 
				
			||||||
        BufferedInputStream pis = ncaProvider.getNCAContentProvider(0)
 | 
					        BufferedInputStream pis = ncaProvider.getNCAContentProvider(0)
 | 
				
			||||||
                .getPfs0()
 | 
					                .getPfs0()
 | 
				
			||||||
                .getStreamProducer(entry.getName())
 | 
					                .getStreamProducer(entry.getName())
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,8 +22,8 @@ import java.io.*;
 | 
				
			||||||
import java.nio.file.Files;
 | 
					import java.nio.file.Files;
 | 
				
			||||||
import java.nio.file.Path;
 | 
					import java.nio.file.Path;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.RomFsProvider;
 | 
					import libKonogonka.fs.RomFs.RomFsProvider;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,9 +21,9 @@ package libKonogonka.unsorted;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
					import libKonogonka.aesctr.AesCtrBufferedInputStream;
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.RainbowDump;
 | 
					import libKonogonka.RainbowDump;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCASectionTableBlock.NcaFsHeader;
 | 
					import libKonogonka.fs.NCA.NCASectionTableBlock.NcaFsHeader;
 | 
				
			||||||
import libKonogonka.Tools.RomFs.FileSystemEntry;
 | 
					import libKonogonka.fs.RomFs.FileSystemEntry;
 | 
				
			||||||
import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
					import libKonogonka.aesctr.AesCtrDecryptForMediaBlocks;
 | 
				
			||||||
import org.junit.jupiter.api.*;
 | 
					import org.junit.jupiter.api.*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -19,10 +19,10 @@
 | 
				
			||||||
package libKonogonka.unsorted;
 | 
					package libKonogonka.unsorted;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import libKonogonka.KeyChainHolder;
 | 
					import libKonogonka.KeyChainHolder;
 | 
				
			||||||
import libKonogonka.Tools.NCA.NCAProvider;
 | 
					import libKonogonka.fs.NCA.NCAProvider;
 | 
				
			||||||
import libKonogonka.Tools.XCI.HFS0File;
 | 
					import libKonogonka.fs.XCI.HFS0File;
 | 
				
			||||||
import libKonogonka.Tools.XCI.HFS0Provider;
 | 
					import libKonogonka.fs.XCI.HFS0Provider;
 | 
				
			||||||
import libKonogonka.Tools.XCI.XCIProvider;
 | 
					import libKonogonka.fs.XCI.XCIProvider;
 | 
				
			||||||
import org.junit.jupiter.api.Disabled;
 | 
					import org.junit.jupiter.api.Disabled;
 | 
				
			||||||
import org.junit.jupiter.api.DisplayName;
 | 
					import org.junit.jupiter.api.DisplayName;
 | 
				
			||||||
import org.junit.jupiter.api.Test;
 | 
					import org.junit.jupiter.api.Test;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue