def hash_sha512(*indata):
hasher = hashlib.sha512()<EOL>for data in indata:<EOL><INDENT>if isinstance(data, str):<EOL><INDENT>hasher.update(data.encode('<STR_LIT:utf-8>'))<EOL><DEDENT>elif isinstance(data, bytes):<EOL><INDENT>hasher.update(data)<EOL><DEDENT>else:<EOL><INDENT>raise Exception('<STR_LIT>' + str(data))<EOL><DEDENT><DEDENT>return hasher.digest()<EOL>
Create SHA512 hash for input arguments.