def generate_nologin_hash(public_string):
    hex_hash = sha256(settings.EMAIL_SECRET_KEY + public_string).hexdigest()

    # Decode the hex hash into base64, reducing the length of the code
    b64_hash = hex_hash.decode('hex').encode("base64")

    # Remove all characters not in our accepted URL-safe alphabet
    regex_pattern = '[^{alphabet}]'.format(alphabet=ESCAPED_URL_ALPHABET)
    return sub(regex_pattern, '', b64_hash)
Returns the number of dimensions for this Point (either 0, 2 or 3).
dataset/ETHPy150Open ofa/connect/open_connect/accounts/utils.py/generate_nologin_hash--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/contrib/gis/geos/point.py/Point.__len__