Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Security - The Password Table
Message
De
02/04/2003 22:45:37
Michael Ouellette
Australian Technical Services (VIC) Pty
Australie
 
 
À
02/04/2003 09:15:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00772923
Message ID:
00773403
Vues:
10
Kevin:

I use "something" like this. You could add a checksum at the end...

Cheerio

Function Encrypt()

Lparameters cLine

Local Password, ii

If Empty(cLine)
Return(cLine)
Endif

m.password = ''
For ii=1 To Len(Trim(cLine))
m.password = m.password + Chr(Asc(Substr(cLine, ii, 1))+Int(10*Log(ii+2)))
Endfor

Return (m.password)

Endfunc

Function Decrypt()

Lparameters cLine, ii

Local Password

If Empty(cLine)
Return(cLine)
Endif

m.password = ''
For ii=1 To Len(Trim(cLine))
m.password = m.password + Chr(Asc(Substr(cLine, ii, 1))-Int(10*Log(ii+2)))
Endfor

Return (m.password)

Endfunc
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform