Validation for sha1 hash.