update validate logic in SHA1 script