including feedback from @jschneier using six.integer_types