bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520)

Automerge-Triggered-By: @tiran
This commit is contained in:
Miro Hrončok 2020-04-14 21:49:11 +02:00 committed by GitHub
parent d42e582063
commit 4c0a31fb08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -12,6 +12,6 @@ def geohash(latitude, longitude, datedow):
'''
# https://xkcd.com/426/
h = hashlib.md5(datedow).hexdigest()
h = hashlib.md5(datedow, usedforsecurity=False).hexdigest()
p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))