added checking

check if digest generated from user input matches reference digest