Sivakumar

Sivakumar

  • NA
  • 551
  • 218.7k

How to encrypt the password using stored procedure

Sep 25 2015 5:08 AM
Hi,
 
 
I want to encrypt password using stored procedure hash 256.
 
This is my table structure :
 
 
 
This is my stored procedure :
 
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[uspAddMember]
@MemberName NVARCHAR(50),
@LoginName NVARCHAR(50),
@LoginPassword NVARCHAR(100)
AS BEGIN

SET NOCOUNT ON;

DECLARE @MemberID INT;

INSERT INTO Member(MemberName, LoginPassword)
VALUES(@MemberName, @LoginPassword);

SET @MemberID = SCOPE_IDENTITY();

INSERT INTO MemberLogin(MemberID, MemberLoginName)
VALUES(@MemberID, @LoginName);

RETURN @MemberID;

END
 
When I execute my procedure encrypted password saved in table
 
Please give me a procedure for that.

Answers (1)