NetTalk Central

Author Topic: calculate a hash string from all fields  (Read 3225 times)

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
calculate a hash string from all fields
« on: March 20, 2015, 03:38:51 AM »
Hallo,


I would like to add a hash field to keep the hash from all fields...and when a field has changed the hash changed and this way I know something has been changed and I do some process.
How can I loop trough all fields and create one big string and then generate a hash from that string?
I have also cryptonite but I don't know how to loop trough fields... :-(

thank you for any tips!

Robert

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: calculate a hash string from all fields
« Reply #1 on: March 20, 2015, 03:58:07 AM »
you don't need to loop through the fields.
All tables have a "record" which is a GROUP - ie a string over the whole record.
So

Hash(fil:record)
will give you the hash of the whole record.

Cheers
Bruce

Robert Iliuta

  • Sr. Member
  • ****
  • Posts: 472
    • View Profile
    • Email
Re: calculate a hash string from all fields
« Reply #2 on: March 20, 2015, 05:56:55 AM »
Thank you Bruce!
nice and clever  ;)

Robert