diff --git a/src/pwd.ts b/src/pwd.ts index 378fdbd..29249b5 100644 --- a/src/pwd.ts +++ b/src/pwd.ts @@ -1,16 +1,16 @@ import logger from 'log' const log = logger('crypto-server:pwd') -export function hash(pwd: string) : Promise { - log.debug('hash password') - return Bun.password.hash(pwd) +export function hash(pwd: string): Promise { + log.debug('hash password') + return Bun.password.hash(pwd) } -export async function verify(pwd: string, hash: string) : Promise { - log.debug("verify password's hash") - return Bun.password.verify(pwd, hash).catch(e => { - log.warn('Password verification failed') - log.debug(`Error : ${e}`) - return false - }) +export async function verify(pwd: string, hash: string): Promise { + log.debug("verify password's hash") + return Bun.password.verify(pwd, hash).catch(e => { + log.warn('Password verification failed') + log.debug(`Error : ${e}`) + return false + }) }