Refactoring SHA1 check