0
Hello! I’m making a process for entering user data and would like to know how to encrypt the password field within the process. My table:
create procedure cadUsuario(
@nome varchar(100),
@email varchar(150),
@data date,
@cpf int,
@rg int,
@senha varchar(100))
as begin
insert into
tb_usuario(nm_usuario, nm_email, dt_nasc, cd_cpf, cd_rg, nm_senha)
values (@nome, @email, @data, @cpf, @rg, @senha)
end
go
Encryption is usually done outside the SQL environment. The database already receives the encrypted data and the server encrypts it. By doing the cipher inside SQL you will be vulnerable to inserting corrupted information, hacking, decryption, etc.
– CypherPotato
then, at the time I give a get on what the user entered, I will need to encrypt and then enter this value in the bank?
– user215274
Basically yes, and similarly you must decrypt when you get the database data. Be careful with SQL Injection when making queries.
– CypherPotato
All right! Thank you!
– user215274