Christin Lange
Programmer
CREATE FUNCTION [dbo].[ufn_EncryptString] ( @pClearString VARCHAR(100) )
RETURNS NVARCHAR(100) WITH ENCRYPTION AS
BEGIN
DECLARE @vEncryptedString NVARCHAR(100)
DECLARE @vIdx INT
DECLARE @vBaseIncrement INT
SET @vIdx = 1
SET @vBaseIncrement = 128
SET @vEncryptedString = ''
WHILE @vIdx <= LEN(@pClearString)
BEGIN
SET @vEncryptedString = @vEncryptedString +
NCHAR(ASCII(SUBSTRING(@pClearString, @vIdx, 1)) +
@vBaseIncrement + @vIdx - 1)
SET @vIdx = @vIdx + 1
END
RETURN @vEncryptedString
I would like to know the C# function for the above mentioned SQL function. I would appreciate if professionals and experts of top software development companies in Dubai help me with it. The reason of getting the help from professionals of top companies is the fact that these people would have already experienced it. Moreover, it is an ultimate fact that people learn a lot from practice rather than just theory.
Can anyone help me workout the same function in C#?
RETURNS NVARCHAR(100) WITH ENCRYPTION AS
BEGIN
DECLARE @vEncryptedString NVARCHAR(100)
DECLARE @vIdx INT
DECLARE @vBaseIncrement INT
SET @vIdx = 1
SET @vBaseIncrement = 128
SET @vEncryptedString = ''
WHILE @vIdx <= LEN(@pClearString)
BEGIN
SET @vEncryptedString = @vEncryptedString +
NCHAR(ASCII(SUBSTRING(@pClearString, @vIdx, 1)) +
@vBaseIncrement + @vIdx - 1)
SET @vIdx = @vIdx + 1
END
RETURN @vEncryptedString
I would like to know the C# function for the above mentioned SQL function. I would appreciate if professionals and experts of top software development companies in Dubai help me with it. The reason of getting the help from professionals of top companies is the fact that these people would have already experienced it. Moreover, it is an ultimate fact that people learn a lot from practice rather than just theory.
Can anyone help me workout the same function in C#?