If I Encrypt() data in a field. How to I ensure that, this field contain Encrypt data?
As Six Driver SX_TABLETYPE(), it will return 1 as Normal, 2 as Encrypt DBF.
How to check it, because when I use Encrypt() again. It did as twice encrypt.
Thanks in advance.
how to check Encrypt() and Decrypt()?
how to check Encrypt() and Decrypt()?
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: how to check Encrypt() and Decrypt()?
Dutch,
This is a first idea that you could enhance:
Anyhow I have found with great surprise that this is not wotking fine:
? hb_decrypt( hb_crypt( "hello" ) )
This is a first idea that you could enhance:
Code: Select all
function Main()
? IsEncrypted( hb_crypt( "Hello" ) )
return nil
function IsEncrypted( cText )
local c
for each c in cText
if ! Lower( c ) $ "abcdefghijklmnopqrstuvwxyz0123456789()[]{}"
return .T.
endif
next
return .F.
? hb_decrypt( hb_crypt( "hello" ) )
Re: how to check Encrypt() and Decrypt()?
Yo lo uso así:
Code: Select all
cCad := hb_Crypt( cCad, cPassW )
Code: Select all
cCad := hb_Decrypt( cCad, cPassW )
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: how to check Encrypt() and Decrypt()?
ok, this way works fine:
? hb_decrypt( hb_crypt( "hello", "key" ), "key" )
thanks Cristobal!
? hb_decrypt( hb_crypt( "hello", "key" ), "key" )
thanks Cristobal!
Re: how to check Encrypt() and Decrypt()?
Dear Antonio&Cnavarro,
Thank you both of you. I got it, we have to write our own function. I've another question.
Which is the best Hb_crypt() and Encrypt() or etc.? Because of GDPR.
Thank you in advance
Thank you both of you. I got it, we have to write our own function. I've another question.
Which is the best Hb_crypt() and Encrypt() or etc.? Because of GDPR.
Thank you in advance
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: how to check Encrypt() and Decrypt()?
Dutch,
Having hb_crypt() and hb_decrypt() and I would advise to use them instead of FWH Encrypt() and Decrypt()
Please be aware that they are not compatible. So please decrypt before changing encryption functions
On the other hand, Harbour functions source code is available, meanwhile FWH encription functions source code it is not
Having hb_crypt() and hb_decrypt() and I would advise to use them instead of FWH Encrypt() and Decrypt()
Please be aware that they are not compatible. So please decrypt before changing encryption functions
On the other hand, Harbour functions source code is available, meanwhile FWH encription functions source code it is not
Re: how to check Encrypt() and Decrypt()?
Dear Antonio,
Thanks a lot, I got it.
Thanks a lot, I got it.
Antonio Linares wrote:Dutch,
Having hb_crypt() and hb_decrypt() and I would advise to use them instead of FWH Encrypt() and Decrypt()
Please be aware that they are not compatible. So please decrypt before changing encryption functions
On the other hand, Harbour functions source code is available, meanwhile FWH encription functions source code it is not
Regards,
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)
Dutch
FWH 19.01 / xHarbour Simplex 1.2.3 / BCC73 / Pelles C / UEStudio
FWPPC 10.02 / Harbour for PPC (FTDN)
ADS V.9 / MySql / MariaDB
R&R 12 Infinity / Crystal Report XI R2
(Thailand)