sha1 implemeted for client side