Fix minor bugs in the use of sha module and misspelled b2a_hex.