Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Encrypt / Decrypt Password
[ All Languages » VB »  String]

Total Hit ( 1513)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


Click here to copy the following block
Option Explicit

Public Function Encrypt(ByVal icText As String) As String
Dim icLen As Integer
Dim icNewText As String
icChar = ""
  icLen = Len(icText)
  For i = 1 To icLen
    icChar = Mid(icText, i, 1)
    Select Case Asc(icChar)
      Case 65 To 90
        icChar = Chr(Asc(icChar) + 127)
      Case 97 To 122
        icChar = Chr(Asc(icChar) + 121)
      Case 48 To 57
        icChar = Chr(Asc(icChar) + 196)
      Case 32
        icChar = Chr(32)
    End Select
    icNewText = icNewText + icChar
  Next
  Encrypt = icNewText
End Function

Public Function Decrypt(ByVal icText As String) As String
Dim icLen As Integer
Dim icNewText As String
icChar = ""
  icLen = Len(icText)
  For i = 1 To icLen
    icChar = Mid(icText, i, 1)
    Select Case Asc(icChar)
      Case 192 To 217
        icChar = Chr(Asc(icChar) - 127)
      Case 218 To 243
        icChar = Chr(Asc(icChar) - 121)
      Case 244 To 253
        icChar = Chr(Asc(icChar) - 196)
      Case 32
        icChar = Chr(32)
    End Select
    icNewText = icNewText + icChar
  Next
  Decrypt = icNewText
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 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.