Skip to content

Serial Number Padding Ignores Remaining Bits #13

Description

@lowlines

While porting the packed item code, I noticed that the encoded serial numbers differed slightly to those generated by the game. If you decode and then re-encode a serail number where the number of packed data bits is not a multiple of 8, the remaining bits of that last byte are not getting set to 1 as part of the padding step when generating the crc32 checksum.

This won't corrupt the packed item at all, but it may result in a different serial number / checksum whenever that item is touched. If you do account for the ignored bits, you should then get 1:1 accurate serial numbers with how the game generates them.

BL2(hwAAAACeowCEZgI/ChEIsGIYxBCA4QDDIYb///////+3YoDFQInh)

padding = b"\xff" * (33 - len(item))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions