public SAV8LA(byte[] data) : base(data) { Data = Array.Empty <byte>(); AllBlocks = SwishCrypto.Decrypt(data); Blocks = new SaveBlockAccessor8LA(this); Initialize(); }
public static byte[] ExportAllBlocks(IReadOnlyList <SCBlock> blocks, SCBlockExportOption option = SCBlockExportOption.None) { if (option == SCBlockExportOption.None) { return(SwishCrypto.GetDecryptedRawData(blocks)); } using var stream = new MemoryStream(); using var bw = new BinaryWriter(stream); for (var i = 0; i < blocks.Count; i++) { ExportBlock(blocks[i], bw, i, option); } return(stream.ToArray()); }
public SAV8LA(byte[] data) : this(SwishCrypto.Decrypt(data)) { }