summaryrefslogtreecommitdiffstats
path: root/Lib/antigravity.py
diff options
context:
space:
mode:
authorMiro HronĨok <miro@hroncok.cz>2020-04-14 19:49:11 (GMT)
committerGitHub <noreply@github.com>2020-04-14 19:49:11 (GMT)
commit4c0a31fb08407ba043688ad1c21102dd4cb99146 (patch)
treef6f3a49a08b3a2d3c450788c5f28a69daf5d4bae /Lib/antigravity.py
parentd42e5820631cd66ee1eab8f610d4b58f3dfdd81c (diff)
downloadcpython-4c0a31fb08407ba043688ad1c21102dd4cb99146.zip
cpython-4c0a31fb08407ba043688ad1c21102dd4cb99146.tar.gz
cpython-4c0a31fb08407ba043688ad1c21102dd4cb99146.tar.bz2
bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520)
Automerge-Triggered-By: @tiran
Diffstat (limited to 'Lib/antigravity.py')
-rw-r--r--Lib/antigravity.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/antigravity.py b/Lib/antigravity.py
index c6f174c..6dc5207 100644
--- a/Lib/antigravity.py
+++ b/Lib/antigravity.py
@@ -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:]))