#Region "Password Encryption"
Public Function EnCrypt(ByVal strCryptThis)
key = "`*Y8+Y.UR(A8&T[JP9RW*6J.>LZO16-B/N<FO5:ZG<,B.C4ZZ*M>7VO$MLNV0??>_E1-ZTXH_L)@XW8MFT?PES\-Z(5BY=O3QJ]7MM9@+XC34-I;T*C<[HUEK,2768816E6M*Z.LH:/E@<<-(BL)>.K7@18`D*IB/Q-Z17H6[J[`@@`,^8LA,=OKZR9*GMU2]H3I&YZHG%=073J._;50(35M>+(:A\1H(D:BI?8L-`E[&MJ;/39%42$FA>2QK-I-#D;>SPJF`=SJFM4GKYE?/`/QR+@;J6]#"
Dim iKeyChar, iStringChar, i, strEncrypted, iCryptChar, g_Key ',strChar
If Len(strCryptThis) > 0 Then
g_Key = Mid(key, 1, Len(strCryptThis))
For i = 1 To Len(strCryptThis)
iKeyChar = Asc(Mid(g_Key, i, 1))
iStringChar = Asc(Mid(strCryptThis, i, 1))
iCryptChar = iStringChar + iKeyChar
strEncrypted = strEncrypted & Chr(iCryptChar)
Next
EnCrypt = strEncrypted
Else
EnCrypt = strCryptThis
End If
End Function
#End Region
#Region "Password Decryption"
Function DeCrypt(ByVal strEncrypted)
key = "`*Y8+Y.UR(A8&T[JP9RW*6J.>LZO16-B/N<FO5:ZG<,B.C4ZZ*M>7VO$MLNV0??>_E1-ZTXH_L)@XW8MFT?PES\-Z(5BY=O3QJ]7MM9@+XC34-I;T*C<[HUEK,2768816E6M*Z.LH:/E@<<-(BL)>.K7@18`D*IB/Q-Z17H6[J[`@@`,^8LA,=OKZR9*GMU2]H3I&YZHG%=073J._;50(35M>+(:A\1H(D:BI?8L-`E[&MJ;/39%42$FA>2QK-I-#D;>SPJF`=SJFM4GKYE?/`/QR+@;J6]#"
Dim iKeyChar, iStringChar, i, g_Key, iDeCryptChar, strDecrypted
If Len(strEncrypted) > 0 And Not IsNumeric(strEncrypted) Then
g_Key = Mid(key, 1, Len(strEncrypted))
For i = 1 To Len(strEncrypted)
iKeyChar = (Asc(Mid(g_Key, i, 1)))
iStringChar = Asc(Mid(strEncrypted, i, 1))
If iStringChar = 32 Then iStringChar = 160
iDeCryptChar = iStringChar - iKeyChar
strDecrypted = strDecrypted & Chr(iDeCryptChar)
Next
DeCrypt = strDecrypted
Else
DeCrypt = strEncrypted
End If
End Function
#End Region
Public Function EnCrypt(ByVal strCryptThis)
key = "`*Y8+Y.UR(A8&T[JP9RW*6J.>LZO16-B/N<FO5:ZG<,B.C4ZZ*M>7VO$MLNV0??>_E1-ZTXH_L)@XW8MFT?PES\-Z(5BY=O3QJ]7MM9@+XC34-I;T*C<[HUEK,2768816E6M*Z.LH:/E@<<-(BL)>.K7@18`D*IB/Q-Z17H6[J[`@@`,^8LA,=OKZR9*GMU2]H3I&YZHG%=073J._;50(35M>+(:A\1H(D:BI?8L-`E[&MJ;/39%42$FA>2QK-I-#D;>SPJF`=SJFM4GKYE?/`/QR+@;J6]#"
Dim iKeyChar, iStringChar, i, strEncrypted, iCryptChar, g_Key ',strChar
If Len(strCryptThis) > 0 Then
g_Key = Mid(key, 1, Len(strCryptThis))
For i = 1 To Len(strCryptThis)
iKeyChar = Asc(Mid(g_Key, i, 1))
iStringChar = Asc(Mid(strCryptThis, i, 1))
iCryptChar = iStringChar + iKeyChar
strEncrypted = strEncrypted & Chr(iCryptChar)
Next
EnCrypt = strEncrypted
Else
EnCrypt = strCryptThis
End If
End Function
#End Region
#Region "Password Decryption"
Function DeCrypt(ByVal strEncrypted)
key = "`*Y8+Y.UR(A8&T[JP9RW*6J.>LZO16-B/N<FO5:ZG<,B.C4ZZ*M>7VO$MLNV0??>_E1-ZTXH_L)@XW8MFT?PES\-Z(5BY=O3QJ]7MM9@+XC34-I;T*C<[HUEK,2768816E6M*Z.LH:/E@<<-(BL)>.K7@18`D*IB/Q-Z17H6[J[`@@`,^8LA,=OKZR9*GMU2]H3I&YZHG%=073J._;50(35M>+(:A\1H(D:BI?8L-`E[&MJ;/39%42$FA>2QK-I-#D;>SPJF`=SJFM4GKYE?/`/QR+@;J6]#"
Dim iKeyChar, iStringChar, i, g_Key, iDeCryptChar, strDecrypted
If Len(strEncrypted) > 0 And Not IsNumeric(strEncrypted) Then
g_Key = Mid(key, 1, Len(strEncrypted))
For i = 1 To Len(strEncrypted)
iKeyChar = (Asc(Mid(g_Key, i, 1)))
iStringChar = Asc(Mid(strEncrypted, i, 1))
If iStringChar = 32 Then iStringChar = 160
iDeCryptChar = iStringChar - iKeyChar
strDecrypted = strDecrypted & Chr(iDeCryptChar)
Next
DeCrypt = strDecrypted
Else
DeCrypt = strEncrypted
End If
End Function
#End Region
No comments :
Post a Comment