def sha1_hash_digest(payload):
 return base64.b64encode(hashlib.sha1(payload).digest())

def sha1_hash_digest ( payload ) : return base64 . b64encode ( hashlib . sha1 ( payload ) . digest ( ) )
create a sha1 hash and return the base64 string .