more documentation...
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
## bcrypt
|
||||
|
||||
Das BcryptPackage-Interface bietet Funktionen zur Passworthashing und -überprüfung mit dem bcrypt-Algorithmus. Es beinhaltet folgende Methoden:
|
||||
|
||||
- `hash(password: string, options?: {}: string`:
|
||||
Diese Methode nimmt ein Klartextpasswort und optionale Hashing-Optionen entgegen und gibt das gehashte Passwort zurück. Die Optionen können den "cost"-Parameter steuern, der die Komplexität des Hashings bestimmt.
|
||||
|
||||
- `check(password: string, hash: string): boolean`:
|
||||
Diese Methode nimmt ein Klartextpasswort und ein gehashtes Passwort entgegen und gibt zurück, ob das Klartextpasswort nach dem Hashing mit dem gehashten Passwort übereinstimmt.
|
||||
|
||||
```ts
|
||||
interface BcryptPackage {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user