moved sha1 and utf8encode to services.