factor state initialisation into own function
seperate state from extended heap
use same heap space for input and output state
seperate getRawDigest function
add optional offset