Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP implementation of the Cipher encryption
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01192734
Message ID:
01192941
Vues:
12
If I used a key string having a different character , the chipher give correct result
cPassword = "dataworld4Asistdbc"
cKeyStr =   "qwertyuopasdfghjkl"

? decrypt(encrypt(cKeyStr, cPassword), cKeyStr) && return  dataworld4Asistdbc [correct]

*** same password different key string

cKeyStr =   "##################" 
? decrypt(encrypt(cKeyStr, cPassword), cKeyStr) && return  {`utnsoc5`tjrugmb [wrong]
>I had tested some string with chipher function. The tested strings and results is following.
>I known the error is related to me not the function, but I don't find where it is. can you help me again, mr. Berezniker
>
>
>
>
>cPassword = "dataworld4sistdbc"
>cKeyStr =  replicate("#", len(cPassword))
>? decrypt(encrypt(cKeyStr, cPassword), cKeyStr) && return  dataworld4sistdbc [correct]
>
>
>*** this password is like to previous one. Only one additional char added to first password
>cPassword = "dataworld4Asistdbc"  && A is added
>cKeyStr =  replicate("#", len(cPassword))
>? decrypt(encrypt(cKeyStr, cPassword), cKeyStr) && return  {`utnsoc5`tjrugmb [wrong]
>
>
>cPassword = "1234 5678 9012 4563"
>cKeyStr =  replicate("#", len(cPassword))
>? decrypt(encrypt(cKeyStr, cPassword), cKeyStr) && return  1234 5678 9012 4563 [correct]
>
>
>
>
>
>>The correct way to call it
>>? _decrypt(_encrypt(cKeyStr, cPassword), cPassword)
>>
>>
>>>I have used following code part to test chipher function. Where is the mistake I have made.
>>>
>>>
>>>cPassword = "12345678"
>>>cKeyStr   = "AAAAAAAA"
>>>
>>>? decrypt(cStr, encrypt(cStr, cPassword)) && return correct string : 12345678
>>>
>>>cPassword = "123456789012345678"
>>>cKeyStr   = "AAAAAAAAAAAAAAAAAA"
>>>
>>>? decrypt(cStr, encrypt(cStr, cPassword))  && return wrong string : .32K676;>105054589
>>>
>>>
>>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform