|
|
@@ -5,6 +5,7 @@ import { Auth, User, _Class, FrontcraftFeatureIfc, SomeOf, FrontcraftIfc, } from
|
|
5
|
5
|
import { CookieService } from 'ngx-cookie-service';
|
|
6
|
6
|
import { Router } from '@angular/router';
|
|
7
|
7
|
import { ShoutMessage } from '../../../../../backend/Components/Shoutbox/Interface';
|
|
|
8
|
+import { saltedHash } from '../../../../../backend/Util/hash';
|
|
8
|
9
|
|
|
9
|
10
|
@Injectable()
|
|
10
|
11
|
export class ApiService{
|
|
|
@@ -142,9 +143,7 @@ function buf2hex(buffer: ArrayBuffer) {
|
|
142
|
143
|
}
|
|
143
|
144
|
|
|
144
|
145
|
export async function hash(value:string) : Promise<string>{
|
|
145
|
|
- const buf = str2arraybuf(value)
|
|
146
|
|
- const pwHash = await crypto.subtle.digest('SHA-256', buf);
|
|
147
|
|
- return buf2hex(pwHash)
|
|
|
146
|
+ return saltedHash(value, "")
|
|
148
|
147
|
}
|
|
149
|
148
|
|
|
150
|
149
|
//angular depenency manager requires this
|