--first create table LOGINDETAILSS in database ENCPTPASSWARD.....----
CREATE DATABASE ENCPTPASSWARDuse ENCPTPASSWARD
create table LOGINDETAILSS (EmailId nvarchar(50) primary key,Password nvarchar(50))
--Insert Encrypted Password in Sql Server:-
insert into LOGINDETAILSS values('hrngaitmartindia.com',encryptbypassphrase('sunil','kumar12345'))
-- fetch data from table without Decrypted form
select * from LOGINDETAILSS-- Show data with Decrypted form
select EmailId,CONVERT(varchar(max),Decryptbypassphrase('sunil',Password)) as Password from LOGINDETAILSS
No comments:
Post a Comment