]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520)
authorMiro Hrončok <miro@hroncok.cz>
Tue, 14 Apr 2020 19:49:11 +0000 (21:49 +0200)
committerGitHub <noreply@github.com>
Tue, 14 Apr 2020 19:49:11 +0000 (12:49 -0700)
Automerge-Triggered-By: @tiran
Lib/antigravity.py

index c6f174ca6d8736949754519c167fea0182246827..6dc520733577af68cd7926105204baf807251a39 100644 (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:]))