ソースを参照

hash over http

master
peter 5年前
コミット
b01a06fa10
1個のファイルの変更2行の追加3行の削除
  1. 2
    3
      src/frontend/src/app/frontcraft/services/login-api.ts

+ 2
- 3
src/frontend/src/app/frontcraft/services/login-api.ts ファイルの表示

@@ -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

読み込み中…
キャンセル
保存