Encryption / Decryption set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO CREATE FUNCTION [dbo].[fn_Cryptography] ( @String varchar(50) ) /* Author: POONGUNRAN S Create date: 29-May-2013 Description: Encrypt / Decrypt Parameters : @String - String to be encrypted / decrypted */ RETURNS varchar(50) AS BEGIN IF @String = '' RETURN '' SELECT @String = LTRIM(RTRIM(@String)) DECLARE @Key varchar(50), @Crypt varchar(50), @Len smallint, @n smallint SELECT @n = 235 SELECT @Key = '' WHILE @n <= 255 BEGIN SELECT @Key = @Key + CHAR(@n) SELECT @n = @n + 1 END SELECT @Crypt = '' SELECT @Len = LEN(@String) SELECT @n = 1 WHILE @n <= @Len BEGIN SELECT @Crypt = @Crypt + CHAR(ASCII(SUBSTRING(@String,@n,1)) ^ ASCII(SUBSTRING(@Key,@n,1))) SELECT @n = @n + 1 END RETURN @Crypt END Input put: Select dbo.fn_Cryptography('test') o/p : Ÿ‰žš select dbo.fn_Cryptography('Ÿ‰žš') o/p : test
P
poongunrans
@poongunrans
Posts
-
decryption -
Store string listuse String builder . it's best one store to string and then compare to string is very fast.. Another one - List slist = new List();
-
Color.Translator.FromHtml inside off @Html.DisplayFor Issue -RazorIn GridView BackColor='<# System.Drawing.Color.FromName(Eval("item_color").ToString())%>'
-
how to get the ID of the selected item in listview itemtemplate in asp.net2008use this format onClinentClick="Script_Name(this.id);" function Script_Name(id) { var oID = document.getElementByID(id).value; alert(oID); }
-
How to use i frame in asp.net with dynamic heightset runat="server" id="ifWidth" in iframe tags. and then write the coding in server side in bellow format ifWidth.Attribute.add("style","height:350;");