Hi there.
lets say I encode an array full of data and then get a hash of it ..... given the identical set of keys and data...am i guaranteed the same hash on every platform? or is ordering something I need to consider? ... I MUST guarantee the same hash........or is this a bad idea?
Thanks
Tom
hashing encoded arrays?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
hashing encoded arrays?
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: hashing encoded arrays?
Assuming you're using LC's built-in hash functions, the hash should be the same on the same data. But as far as creating that data from an array, I wouldn't count on the serialized form of an array remaining the same across platforms or possibly even across sessions on the same platform.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: hashing encoded arrays?
yeah...... that was my worry.
hmmmm.. not sure what to do to solve this. Thanks Richard
hmmmm.. not sure what to do to solve this. Thanks Richard
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: hashing encoded arrays?
An array only lives in the current session anyway. Maybe you could create the hash from the data used to populate the array, or save the serialized form?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: hashing encoded arrays?
that seems like the only option ... thanks for your help.
Founder & Developer @ MakeShyft R.D.A - https://www.makeshyft.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com
Build Software with AppStarterStack for Livecode - https://www.AppStarterStack.com
Save Time with The Time Saver's Toolbox - https://www.TimeSaversToolbox.com