mercredi 13 juillet 2016

How secure is base64 encoding in combination with lower case conversion for passwords?

I'm currently working on a school-project and part of the task is to enable user login. Therefore I thought that using a simple base64 encoding with an conversion to lower case afterwards would be a pretty good encryption, because base64 normally consists of upper and lower characters. Here's a representational code:

set @passwd = 'Password';
set @salt = 'Salt';
set @email = 'tmp@gmail.com';

INSERT INTO `db_scrumboardtable`.`tb_user` (`mail`, `password`, `nameToDisplay`) VALUES (@email, LOWER(to_base64(sha2(concat(@passwd,@salt),512))) , 'test');

select u.tb_User_id from `db_scrumboardtable`.`tb_user` u where u.mail = @email and u.password = LOWER(to_base64(sha2(concat(@passwd,@salt),512)));

Aucun commentaire:

Enregistrer un commentaire