def input_validate_int(value, name, max_value=None):
if type(value) is not int:<EOL><INDENT>raise pyhsm.exception.YHSM_WrongInputType(name, int, type(value))<EOL><DEDENT>if max_value != None and value > max_value:<EOL><INDENT>raise pyhsm.exception.YHSM_WrongInputSize(name, max_value, value)<EOL><DEDENT>return value<EOL>
Input validation for integers.