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.
problem with Decript function
- Silvio.Falconi
- Posts: 7110
- Joined: Thu Oct 18, 2012 7:17 pm
problem with Decript function
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Antonio Linares
- Site Admin
- Posts: 42393
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 9 times
- Been thanked: 41 times
- Contact:
Re: problem with Decript function
Dear Silvio,
Please try it this way:
cPasw = Decrypt( AllTrim( oUtenti:PassW ) )
Please try it this way:
cPasw = Decrypt( AllTrim( oUtenti:PassW ) )
- Silvio.Falconi
- Posts: 7110
- Joined: Thu Oct 18, 2012 7:17 pm
Re: problem with Decript function
Antonio Linares wrote: Sun Jan 19, 2025 7:14 pm 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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Antonio Linares
- Site Admin
- Posts: 42393
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 9 times
- Been thanked: 41 times
- Contact:
Re: problem with Decript function
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" ) ) )
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" ) ) )