I cannot understand this problem.
Please I need explanation.
I store a password created using hb_crypt in a .ini file
the password is "charlybrown" crypted using hb_crypt()
The Key is "12345678"
cPassword := HB_CRYPT( "charlybrown" , "12345678" )
If I read ini files using HB_READINI and than decrypt I obtain "charlybrown" If I use GETPVPROFSTRING not.
The difference between cVar1 and cVar2 is the first character that compromoses the crypted string.
Thanks in advance
Marco
- Code: Select all Expand view
#include "fivewin.ch"
FUNCTION MAIN()
LOCAL cKeyCry := "12345678"
LOCAL cCri1
LOCAL cCri2
LOCAL cVar1
LOCAL cVar2
LOCAL hIniData
hIniData := HB_READINI( "critt.ini" )
cCri1 := hIniData["Main"]["Password"]
cVar1 := HB_DECRYPT( cCri1 , cKeyCry )
cCri2 := GETPVPROFSTRING( "Main" , "Password" , "" , ".\critt.ini" )
cVar2 := HB_DECRYPT( cCri2 , cKeyCry )
? cCri1
? cCri2
? cVar1
? cVar2
RETURN NIL
/*
[Main]
Password=Öó|^4@L×0W
N.B. obviously this string was created with HB_CRYPT( "charlybrown", "12345678" )
*/