mirror of https://github.com/MISP/PyMISP
chg: [FIPS] falling back on older version of Python not having usedforsecurity
parent
1efc735fb3
commit
14bf1f8189
|
@ -354,9 +354,9 @@ class MISPAttribute(AbstractMISP):
|
|||
hashes = []
|
||||
for v in self.value.split('|'):
|
||||
try:
|
||||
h = hashlib.new(algorithm)
|
||||
except ValueError:
|
||||
h = hashlib.new(algorithm, usedforsecurity=False)
|
||||
except:
|
||||
h = hashlib.new(algorithm)
|
||||
h.update(v.encode("utf-8"))
|
||||
hashes.append(h.hexdigest())
|
||||
return hashes
|
||||
|
|
Loading…
Reference in New Issue