pkg(7): now that we do use libmd, use it completly
Use SHA256_Fd and SHA256_Data instead of home made equivalent.
wrap those functions into hash.c to avoid header collition between
openssl and libmd
Suggested by: kevans
(cherry picked from commit e5dd5bfa55dc82686870330f547932486ba48db2)