change digest return type to array of Uint8; add utility functions to convert to and from hex string / unit8 array