4 ms·
Hmm, seems to me using both is optimal horrible psuedocode follows... cryptchoice = len(username) % 3 switch cryptchoice: case 0: pepper = pe
by earblast 7y ago
Hmm, seems to me using both is optimal
horrible psuedocode follows...
cryptchoice = len(username) % 3
switch cryptchoice:
case 0:
pepper = pepper[1]
salt = email
case 1:
pepper = pepper[0]
salt = creation_time
case 2:
pepper = pepper[2]
salt = username
bcrypt(salt+password+pepper)
- c22 7y agoIt's definitely wise to use both a salt and a pepper when hashing passwords. Don't bother with the switch statement, though, it's just security through obscurity. You're much better off keeping your security-related code as simple as possible so it's easier to notice bugs in it.