Software Engineer. Exploring AI and dev tools. Python, Rust, Go, Typescript, Svelte
Nothing here yet.
SHOBHIT RASTOGI This is an excellent catch. I didn't think of it this way. Another concern is the way security is handled in the backend. In this block of code , the TOKEN_SECRET is manually added to the token. https://www.loom.com/share/2310a29733d44bd2ba86241b8393924f Now I can mint my own tokens
Regarding the security, const bcryptHashedPassword = bcrypt.hashSync(reversedSHAHash, 5 ); Here 5 is the salt round or cost factor . The total number of rounds/times hashed = 2 ^ (salt rounds). So your implementation hashes the password 32 times. Nowadays, bcrypt libraries use the cost factor of 10 by default, i.e., 1024 rounds.
Fixes: Lambda Function >>> arr_list = [[1, 4], [3, 3], [5, 7]] >>> sorted_list = sorted(arr_list, key=lambda x: x[1]) >>> sorted_list [[3, 3], [1, 4], [5, 7]] Sliding windows >>> from itertools import islice >>> def slide(list_name, window_size): ... z = [islice(list_name, i, None) for i in range(window_size)] ... return zip(*z)