November 17, 2005 at 5:38 pm
I want to create table name "App_Users" with follwoing fields
1) auserid - bigint
2) ausername - varchar(20)
3) password --varchar(20)
what data type should i used for password field so i can have folloing functionality
1) sql login user can not view password by firing query
select * from App_users
2) my application should varify password when user enter it.
Please guide me for designing table structure ?
Thanks
November 17, 2005 at 7:28 pm
You could use the SQL Server password encryption routine.
Create table App_users
( auserid - bigint
, ausername varchar(20)
, EncryptedPassword varbinary(256)
)
Then, during the login process with a password, encrypt it and then compare to the value in the table.
declare @Password Nvarchar(128)
, @EncryptedPassword varbinary(256)
set @Password = 'AB1gS3cr3t'
set @EncryptedPassword = CAST( pwdencrypt( @Password ) as varbinary(256))
select @EncryptedPassword
SQL = Scarcely Qualifies as a Language
November 22, 2005 at 10:31 pm
Very Thanks Carl Federl ,
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply