validate_key must be bytes in py3k.