def ComputeMD5Base64(byte_str):
 hasher = hashlib.md5()
 hasher.update(byte_str)
 return base64.b64encode(hasher.digest())

def ComputeMD5Base64 ( byte_str ) : hasher = hashlib . md5 ( ) hasher . update ( byte_str ) return base64 . b64encode ( hasher . digest ( ) )
compute md5 hash of "byte_str" and return it encoded as a base-64 string .