mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Use MD5 usedforsecurity=False on Python 3.9 and higher to pass FIPS
Closes #2270
This commit is contained in:
parent
5d79974186
commit
b89cac3b6a
2 changed files with 11 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import asyncio
|
||||
from collections import namedtuple
|
||||
from pathlib import Path
|
||||
import hashlib
|
||||
import janus
|
||||
import queue
|
||||
import sys
|
||||
|
|
@ -15,6 +14,7 @@ from .utils import (
|
|||
detect_spatialite,
|
||||
get_all_foreign_keys,
|
||||
get_outbound_foreign_keys,
|
||||
md5_not_usedforsecurity,
|
||||
sqlite_timelimit,
|
||||
sqlite3,
|
||||
table_columns,
|
||||
|
|
@ -74,7 +74,7 @@ class Database:
|
|||
def color(self):
|
||||
if self.hash:
|
||||
return self.hash[:6]
|
||||
return hashlib.md5(self.name.encode("utf8")).hexdigest()[:6]
|
||||
return md5_not_usedforsecurity(self.name)[:6]
|
||||
|
||||
def suggest_name(self):
|
||||
if self.path:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue