From: Miro HronĨok Date: Tue, 14 Apr 2020 19:49:11 +0000 (+0200) Subject: bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520) X-Git-Tag: v3.9.0a6~116 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4c0a31fb08407ba043688ad1c21102dd4cb99146;p=thirdparty%2FPython%2Fcpython.git bpo-9216: Nobody expects the geohashing FIPS inquisition (GH-19520) Automerge-Triggered-By: @tiran --- diff --git a/Lib/antigravity.py b/Lib/antigravity.py index c6f174ca6d87..6dc520733577 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:]))