1
Fork 0
mirror of https://github.com/Steffo99/appunti-magistrali.git synced 2025-02-16 18:04:00 +00:00
appunti-steffo/8 - Crittografia applicata/4 - Controllo dell'accesso/2 - Protezione dai data breach/PBKDF1.md

14 lines
305 B
Markdown
Raw Permalink Normal View History

2023-09-21 02:46:23 +02:00
[[funzione di password hashing]].
## Funzionamento
Computa l'hash un numero significativo di volte, detto [[rounds]].
```python
def pbkdf1(salt, password, rounds):
current_hash = hash(safe_concat(salt, password))
for _ in range(rounds-1):
current_hash = hash(current_hash)
return current_hash
```