Correct integer input value for keccak 256 Assuming that we use k = sha3.keccak_256()(pysha3 package).

How should one convert integer input for a function k.update(myinteger) so that the output will be correct?

example:

import sha3    

myinteger = 1064880000

k = sha3.keccak_256()
k.update(myinteger)
k.hexdigest()
Define 'correct'

That is less silly of an answer than you might think; SHA-3-256 is a function from bitstrings (or bytestrings) to 256 bit hashes; it has no predefined ideas about a mapping of an integer to those bitstrings; it'll work for any of them.

Now, the application which is using SHA-3 might have such a predefined idea, and hence might define a 'correct' way.  However, there is nothing in the code segment above would define it, and we have no idea what application you are attempting to be compatible with.

If you have no predefined application, and are just looking for a plausible way, might I suggest converting the integer into a little-endian 4 byte string (or 8 byte, if the integer value might be above 4 billion).  That's as good as any...