FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour problem with Decript function
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
problem with Decript function
Posted: Sun Jan 19, 2025 04:05 PM
I noticed the problem because in an old program when I insert a user and go to save the password it saves it like this



then I not understood how it save the password on field on archive

cPassw:=Encrypt(cPassw1)
oUtente:PassW :=cPassw
oUtente:save()

but when I have to convert it again to do the login check it tells me that the passwords do not match

cPasw:=Alltrim(Decrypt(oUtenti:PassW))

IF cPasw==cPass //cPass is the value insert by user
lRet:=lCont:=.T.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: problem with Decript function
Posted: Sun Jan 19, 2025 07:14 PM

Dear Silvio,

Please try it this way:

cPasw = Decrypt( AllTrim( oUtenti:PassW ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: problem with Decript function
Posted: Mon Jan 20, 2025 08:20 AM
Antonio Linares wrote: Dear Silvio,

Please try it this way:

cPasw = Decrypt( AllTrim( oUtenti:PassW ) )

I allready tested



aòlso with cPasw = Decrypt( AllTrim( oUtenti:PassW ) )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: problem with Decript function
Posted: Mon Jan 20, 2025 09:12 AM

Dear Silvio,

The field may have more spaces that the encripted string thats why we need to alltrim before

To verify that those functions work fine, try this:

MsgInfo( Decrypt( Encrypt( "Hello" ) ) )

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion