moved sha1_digest() to util