Web Connection
sha512
Gravatar is a globally recognized avatar based on your email address. sha512
  jeff lee
  All
  Feb 19, 2019 @ 05:54pm

Hi Rick: I am using SET LIBRARY TO LOCFILE("vfpencryption71.fll") ADDITIVE to calculate hash,

lctemp1 = 'this is a test' lctemp = STRCONV(hash(lctemp1,4),15)

  • lctemp holds hashed value
  • 7D0A8468ED220400C0B8E6F335BAA7E070CE880A37E2AC5995B9A97B809026DE626DA636AC7365249BB974C719EDF543B52ED286646F437DC7F810CC2068375C CAn I get the same result if I use computehash(lctemp1,'SHA512')?

Thanks and Regards, Jeff Lee

Gravatar is a globally recognized avatar based on your email address. re: sha512
  Rick Strahl
  jeff lee
  Feb 19, 2019 @ 06:15pm

Yes...

Just make sure you use SetBinHexMode(.T.) to return the result in BinHex formatting instead of base64:

o = CREATEOBJECT("wwEncryption")

* base64: PJFyN+04jov4/kLaWioKHk0p4y+Lk1Gsh4ZBt7JzCs4=
? o.ComputeHash("asdaskdjlasdkjasdasd","SHA256")

? o.SetBinhexmode(.T.)

* binHex: 3C917237ED388E8BF8FE42DA5A2A0A1E4D29E32F8B9351AC878641B7B2730ACE
? o.ComputeHash("asdaskdjlasdkjasdasd","SHA256")
© 1996-2019