Refactoring + Crypto.sha1
Added sha1 test