diff --git a/src/frontend/src/app/frontcraft/services/login-api.ts b/src/frontend/src/app/frontcraft/services/login-api.ts index c87adb0..9f751d2 100644 --- a/src/frontend/src/app/frontcraft/services/login-api.ts +++ b/src/frontend/src/app/frontcraft/services/login-api.ts @@ -5,6 +5,7 @@ import { Auth, User, _Class, FrontcraftFeatureIfc, SomeOf, FrontcraftIfc, } from import { CookieService } from 'ngx-cookie-service'; import { Router } from '@angular/router'; import { ShoutMessage } from '../../../../../backend/Components/Shoutbox/Interface'; +import { saltedHash } from '../../../../../backend/Util/hash'; @Injectable() export class ApiService{ @@ -142,9 +143,7 @@ function buf2hex(buffer: ArrayBuffer) { } export async function hash(value:string) : Promise{ - const buf = str2arraybuf(value) - const pwHash = await crypto.subtle.digest('SHA-256', buf); - return buf2hex(pwHash) + return saltedHash(value, "") } //angular depenency manager requires this