SHA2(3) Library Functions Manual SHA2(3)

Sha2A simple implementation of the SHA2 hashing functions.

#include <Sha2.h>

char *
Sha256(char *);

This API defines simple functions for computing SHA2 hashes. At the moment, it only defines (), which computes the SHA-256 hash of the given C string. It is not trivial to implement SHA-512 in ANSI C due to the lack of a 64-bit integer type, so that hash function has been omitted.

Sha256() returns a string allocated on the heap using the Memory API, or NULL if there was an error allocating memory for it. The returned string should be freed when it is no longer needed.

Memory(3), Base64(3)

December 19, 2022 Telodendria Project