From cfa8f7bd821168adaedabe0ffca8a46e079e3f01 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Thu, 18 Dec 2025 17:16:10 +0800 Subject: [PATCH] Updated login page --- src/pages/LoginPage/Login.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/pages/LoginPage/Login.tsx b/src/pages/LoginPage/Login.tsx index 10ee2d5..c4d2d0f 100644 --- a/src/pages/LoginPage/Login.tsx +++ b/src/pages/LoginPage/Login.tsx @@ -1,11 +1,10 @@ import { useNavigate } from '@solidjs/router' -import { SHA1, SHA3 } from 'crypto-js' import { IoChevronBack } from 'solid-icons/io' import { createEffect, createSignal } from 'solid-js' import { Show } from 'solid-js/web' import { Box, Button, Column, Combobox, Display, Input, Link, Logo, Modal, Padding, Page, Radio, Row } from '../../components' import { _employeeId, _employeeName } from '../../stores/employee' -import { checkConnection, getApi } from '../../utils/functions' +import { checkConnection, getApi, securePassword } from '../../utils/functions' import './Login.sass' export default () => { @@ -30,7 +29,7 @@ export default () => { const employeeid = await getApi('get-employeeid', name()) const dbpassword = await getApi('get-password', employeeid) - const hashPassword = await securePassword() + const hashPassword = await securePassword(password()) if (dbpassword === '0') { setErrorMessage('Not yet registered. Please proceed to Registration.') @@ -48,13 +47,13 @@ export default () => { } } - const securePassword = async () => { - const firstHashing = SHA1(password()) - const secondHashing = SHA3(firstHashing) - const thirdHashing = SHA1(secondHashing) + // const securePassword = async () => { + // const firstHashing = SHA1(password()) + // const secondHashing = SHA384(firstHashing.toString()) + // const thirdHashing = SHA1(secondHashing.toString()) - return thirdHashing.toString() - } + // return thirdHashing.toString() + // } const gotoMain = () => { navigate('/main')