hash over http
This commit is contained in:
@@ -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<string>{
|
||||
const buf = str2arraybuf(value)
|
||||
const pwHash = await crypto.subtle.digest('SHA-256', buf);
|
||||
return buf2hex(pwHash)
|
||||
return saltedHash(value, "")
|
||||
}
|
||||
|
||||
//angular depenency manager requires this
|
||||
|
||||
Reference in New Issue
Block a user