added tests for bcrypto hasher, fixed some bugs