Skip to content

Commit

Permalink
updated pbkdf salting
Browse files Browse the repository at this point in the history
  • Loading branch information
metamorphic-spyware committed May 23, 2022
1 parent 8d999de commit 6b15795
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion enrocrypt/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ def __Salt_PBKDF(self,data):
salts.append(str(hashlib.sha256(uuid.uuid4().bytes).digest()).split("'")[1])
salts.append(str(dataset[i]))
salts.append(str(hashlib.sha256(uuid.uuid4().bytes).digest()).split("'")[1])
return base64.standard_b64encode(bytes((str(base64.urlsafe_b64encode(bytes(''.join(salts).encode()))).split("'")[1]+str(base64.urlsafe_b64encode(base64.standard_b64encode((bytes(''.join(salts).encode()))))).split("'")[1]).encode()))
salting = base64.standard_b64encode(bytes((str(base64.urlsafe_b64encode(bytes(''.join(salts).encode()))).split("'")[1]+str(base64.urlsafe_b64encode(base64.standard_b64encode((bytes(''.join(salts).encode()))))).split("'")[1]).encode()))
if len(salting) > self.byt:
salting = salting.decode()[0:self.byt]
return salting

def SHA256(self,data:str):
sha = hashlib.sha256(bytes(data.encode()))
Expand Down

0 comments on commit 6b15795

Please sign in to comment.