Download Now
Forums

    Reference AssetXor

    Declared in Codebot.Render.Assets.pas on line 75

    AssetXor changes Count bytes at Data with xor. Position is the offset in the dat file of the first byte, so any part of a file can be changed by itself.
    The bytes of a key such as $A1B2C3D4 are numbered one to four from the left, $A1 being the first. The bytes of the file use them in the order four, one, two, three, and then again from four. Doing this twice gives back the bytes which were there, so it is used both to write and to read.
    procedure AssetXor(Data: PByte; Count: SizeInt; Position: Int64; Key: LongWord);