catch buffer  creation errors and return Error to callback
allow only non-empty strings
missing semicolon
Merge pull request #5 from amplego/no-throw

fix verify() throw on bad prior hash