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