Hash token only for ASN1 and PKIZ tokens
Hash token only for ASN1 and PKIZ tokens

Hashing the token only works if the token is ASN1 or PKIZ.
Check the token format instead of naively checking the token
length if it needs to be hashed.

Change-Id: I1c7bb3a1b6e1da30c241a4813bf7544695bd4fab
Closes-Bug: #1439499

dan1/django_openstack_auth_proto,dan1/django_openstack_auth_proto,redhat-openstack/django_openstack_auth,redhat-openstack/django_openstack_auth