Following the recent witch hunt done to static inline functions I figure we should at least give the compiler some more hint on optimizations.
Split out of #37344.
Adds a util function to sha256 an open fd (moved from dissect). Also adds functions to check if a string contains a valid sha256 hash, and parse it into a sha256 array.