more documentation...

This commit is contained in:
2023-06-04 09:34:11 +00:00
parent de71e679ec
commit dc4501b5f2
23 changed files with 737 additions and 69 deletions

View File

@@ -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 {
/**