lint, removed console, removed todo

This commit is contained in:
Ulf Gebhardt 2021-11-03 05:08:05 +01:00
parent 86fbe1d11c
commit 02ce432dc5
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9

View File

@ -106,9 +106,6 @@ const KeyPairEd25519Create = (passphrase: string[]): Buffer[] => {
wordIndicies.push(WORDS.indexOf(passphrase[i])) wordIndicies.push(WORDS.indexOf(passphrase[i]))
} }
// eslint-disable-next-line no-console
console.log(wordIndicies)
const state = Buffer.alloc(sodium.crypto_hash_sha512_STATEBYTES) const state = Buffer.alloc(sodium.crypto_hash_sha512_STATEBYTES)
sodium.crypto_hash_sha512_init(state) sodium.crypto_hash_sha512_init(state)
@ -172,10 +169,9 @@ const SecretKeyCryptographyCreateKey = (salt: string, password: string): Buffer[
return [encryptionKeyHash, encryptionKey] return [encryptionKeyHash, encryptionKey]
} }
const getEmailHash = (email:string):Buffer => const getEmailHash = (email: string): Buffer => {
{
const emailHash = Buffer.alloc(sodium.crypto_generichash_BYTES) const emailHash = Buffer.alloc(sodium.crypto_generichash_BYTES)
sodium.crypto_generichash(emailHash,Buffer.from(email)); sodium.crypto_generichash(emailHash, Buffer.from(email))
return emailHash return emailHash
} }
@ -284,7 +280,6 @@ export class UserResolver {
} }
// Validate Password // Validate Password
// TODO Login Server ignored this when he got an empty password?!
if (!isPassword(password)) { if (!isPassword(password)) {
throw new Error( throw new Error(
'Please enter a valid password with at least 8 characters, upper and lower case letters, at least one number and one special character!', 'Please enter a valid password with at least 8 characters, upper and lower case letters, at least one number and one special character!',