def make_digest_acl_credential(username, password):
 credential = ((username.encode('utf-8') + ':') + password.encode('utf-8'))
 cred_hash = b64encode(hashlib.sha1(credential).digest()).strip()
 return ((username + ':') + cred_hash.decode('utf-8'))

def make_digest_acl_credential ( username , password ) : credential = ( ( username . encode ( 'utf-8' ) + ':' ) + password . encode ( 'utf-8' ) ) cred_hash = b64encode ( hashlib . sha1 ( credential ) . digest ( ) ) . strip ( ) return ( ( username + ':' ) + cred_hash . decode ( 'utf-8' ) )
create a sha1 digest credential .