diff --git a/src/helpers/crypto.ts b/src/helpers/crypto.ts new file mode 100644 index 0000000..06b32cf --- /dev/null +++ b/src/helpers/crypto.ts @@ -0,0 +1,7 @@ +export async function hashString(message = ""): Promise { + const msgUint8 = new TextEncoder().encode(message); + const hashBuffer = await window.crypto.subtle.digest("SHA-256", msgUint8); + const hashArray = Array.from(new Uint8Array(hashBuffer)); + const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join(""); + return hashHex; +} diff --git a/src/views/Login.vue b/src/views/Login.vue index 2ad96f7..8b5ce8c 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -8,13 +8,28 @@ -
+
-
- -
-
+
+
+ + + +
+
+
+ +
- TOTP verloren +

+ Benutzer wechseln +

+ Zugang verloren
@@ -53,6 +81,7 @@ import FormBottomBar from "@/components/FormBottomBar.vue"; import AppLogo from "@/components/AppLogo.vue"; import { mapState } from "pinia"; import { useConfigurationStore } from "@/stores/configuration"; +import { hashString } from "../helpers/crypto";