How the hell did this get back

This commit is contained in:
Tarrgon
2026-06-30 14:54:12 -04:00
parent c8492b8df9
commit 106933df5b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ class Encrypter {
return decipher.update(encrypted, 'hex', 'utf8') + decipher.final('utf8'); return decipher.update(encrypted, 'hex', 'utf8') + decipher.final('utf8');
} }
static hash(clearText) { static hash(clearText) {
return crypto.createHash('sha256', this.key).update(clearText).digest('base64'); return crypto.createHmac('sha256', this.key).update(clearText).digest('base64');
} }
} }
Encrypter.algorithm = 'aes-256-cbc'; Encrypter.algorithm = 'aes-256-cbc';
+1 -1
View File
@@ -38,6 +38,6 @@ export class Encrypter {
} }
static hash(clearText: string): string { static hash(clearText: string): string {
return crypto.createHash('sha256', this.key).update(clearText).digest('base64'); return crypto.createHmac('sha256', this.key).update(clearText).digest('base64');
} }
} }