There are tons of Python checksum/crc type functions out there. Google (or DDG or whatever) is your friend. :) Hexkey could be any of various things, but generating hex keys in general is well covered in programming tutorials and such. I have no clue what hextowif is.
Comment