TokenField and PasswordField

I have created two fields: TokenField and PasswordField.

A TokenField generates a random string to be used as any kind of token (like an api token).

The PasswordField will encode/crypt (using hashlib module) the string to be used as a secure string, but when you search for a document using this field you will use the original string value like: User.objects(password="12345").