Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Code to vb.net code
Message
De
13/03/2003 14:36:50
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00765518
Message ID:
00765532
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Try this:
    Private Function Encrypt(ByVal tcString As String, ByVal tcKey As String) As String
        Dim lnLen As Long, lcKeyExpr As String, lcEncrypt As String, lnI As Long, lnChar As Byte
        lnLen = Len(tcString)
        lcKeyExpr = tcKey
        Do While Len(lcKeyExpr) < lnLen
            lcKeyExpr = lcKeyExpr & tcKey
        Loop
        lcEncrypt = ""
        For lnI = 1 To lnLen
            lnChar = Math.Min(Asc(Mid(tcString, lnI, 1)) + Asc(Mid(lcKeyExpr, lnI, 1)) + lnI, 255)
            lcEncrypt = lcEncrypt & Chr(lnChar)
        Next lnI
        Return lcEncrypt
    End Function

Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000)

VB (.NET) - what other language do you need in the whole Universe?...

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform