Move SHA1 hashing code from WebService