GoFiler Legato Script Reference
Legato v 1.5b Application v 5.24b
|
Table of Contents | < < Previous | Next >> |
Chapter Five — General Functions (continued)
A hash function is any function that can be used to map digital data of arbitrary size to digital data of fixed size. The values returned by a hash function are called hash code (aka as hash values, hash sums, or simply hashes). One practical use is to hash a string and later use that code to compare or validate another string as a password or signature. Another example is a data structure called a hash table which is widely used in computer software for rapid data lookup. Hash functions accelerate table or database lookup by detecting duplicated records in a large file.
Hashing IS also useful in cryptography. A cryptographic hash function allows one to easily verify that some input data matches a stored hash value, but makes it hard to construct any data that would hash to the same value or find any two unique data pieces that hash to the same value. This principle is used by the PGP algorithm for data validation and by many password checking systems.
Hash functions are related to (and often confused with) checksums, check digits, fingerprints, randomization functions, error-correcting codes, and ciphers. Although these concepts overlap to some extent, each has its own uses and requirements and is designed and optimized differently.
Legato provides a number of embedded SDK hash functions and of course programmers can develop their own.
Legato provides for a simple hash based on the DJB2 algorithm.
Summary of hash functions:
HashString — Creates a hash using the DJB2 algorithm.
The MD5 message-digest algorithm is a widely used cryptographic hash function producing a 128-bit (16 byte) hash or digest value, typically expressed in text format as a 32 digit hexadecimal number. MD5 has been utilized in a wide variety of cryptographic applications and digital signatures and is also commonly used to verify data integrity.
MD5 is no longer considered a secure digest method and should be employed for light security or compatibility functions.
Legato MD5 output is always returned as an ASCII presentation of the 16 byte hash. For example:
11ed5eabdbf71fd1a0a41c408ee1e11d
or
f82ea9971b59f4d5e088cfbebbf617e7
The MD5 functions allow strings, buffers of characters and files to be encoded. There are options to perform encoding in a single operation or to open an MD5 object and then feed buffers of data and eventually retrieve a digest.
Summary for MD5 functions:
MD5CreateDigest — Creates an MD5 from a string or file. Returns a hex string.
MD5NewDigestObject — Creates a running MD5 digest object.
MD5AddToDigest — Adds data to a running MD5 digest.
MD5FinishDigest — Finishes a running MD5 digest object.
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.