1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-01 18:18:31 +00:00

Switch from md5 to sha256 for UIDs and tokens

This commit is contained in:
Unrud 2020-01-15 11:20:48 +01:00
parent 6697a6c8c4
commit c99a1f53df
5 changed files with 13 additions and 12 deletions

View file

@ -25,7 +25,7 @@ Module for address books and calendar entries (see ``Item``).
import math
import sys
from hashlib import md5
from hashlib import sha256
from random import getrandbits
import vobject
@ -183,7 +183,7 @@ def get_etag(text):
Encoded as quoted-string (see RFC 2616).
"""
etag = md5()
etag = sha256()
etag.update(text.encode("utf-8"))
return '"%s"' % etag.hexdigest()