mirror of https://github.com/MISP/PyMISP
chg: [FIPS] no clean way to support OpenSSL hashlib interface for FIPS
parent
14bf1f8189
commit
cdf2ee08c1
|
@ -353,10 +353,7 @@ class MISPAttribute(AbstractMISP):
|
|||
if '|' in self.type or self.type == 'malware-sample':
|
||||
hashes = []
|
||||
for v in self.value.split('|'):
|
||||
try:
|
||||
h = hashlib.new(algorithm, usedforsecurity=False)
|
||||
except:
|
||||
h = hashlib.new(algorithm)
|
||||
h = hashlib.new(algorithm)
|
||||
h.update(v.encode("utf-8"))
|
||||
hashes.append(h.hexdigest())
|
||||
return hashes
|
||||
|
|
Loading…
Reference in New Issue