|
|
|
Click here to copy the following block | Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (dest As _ Any, source As Any, ByVal bytes As Long)
Function EncryptString(ByVal Text As String, ByVal Password As String) As String Dim passLen As Long Dim i As Long Dim passChr As Integer Dim passNdx As Long passLen = Len(Password) If passLen = 0 Then Err.Raise 5 ReDim passChars(0 To passLen - 1) As Integer CopyMemory passChars(0), ByVal StrPtr(Password), passLen * 2 For i = 1 To Len(Text) passChr = passChars(passNdx) Mid$(Text, i, 1) = Chr$(Asc(Mid$(Text, i, 1)) Xor passChr) passChars(passNdx) = (passChr + 17) And 255 passNdx = (passNdx + 1) Mod passLen Next
EncryptString = Text End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|