Differences From Artifact [ed7b8f308a]:
- File hash.h — part of check-in [1293433867] at 2022-01-13 06:48:00 on branch trunk — Implement cryptographic hash algorithms. (These are not currently used by Free Hero Mesh but is expected to be used in future.) (user: user, size: 909) [annotate] [blame] [check-ins using]
To Artifact [42028383bc]:
- File hash.h — part of check-in [2e44cdb36f] at 2022-06-13 23:57:13 on branch trunk — Implement MD5 hash algorithm. (This is not used in Free Hero Mesh, but may be used in other programs e.g. to compute the Z card in Fossil decks.) (user: user, size: 931) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | + | // Free public domain cryptographic hash library #define HASH_SHA1 0x11 #define HASH_SHA3_512 0x14 #define HASH_SHA3_384 0x15 #define HASH_SHA3_256 0x16 #define HASH_SHA3_224 0x17 #define HASH_MD5 0xD5 long hash_length(long long alg); // Tell the length (in bytes) of the hash of the specified algorithm. If // it is not implemented, then the result is zero. FILE*hash_stream(long long alg,FILE*echo,unsigned char*out); // Returns a writable stream. If the echo stream is not null, then any |
︙ |