parameters: (data)
return_statement: return b64encode(hasher.digest()).decode("ascii")
docstring: Make an AWS-style MD5 hash (digest in base64).
docstring_summary: Make an AWS-style MD5 hash (digest in base64).
docstring_tokens: Make an AWS - style MD5 hash ( digest in base64 ) .
function: def aws_md5(data):
      """Make an AWS-style MD5 hash (digest in base64)."""
      hasher = hashlib.new("md5")
      if hasattr(data, "read"):
          data.seek(0)
          while True:
              chunk = data.read(8192)
              if not chunk:
                  break
              hasher.update(chunk)
          data.seek(0)
      else:
          hasher.update(data)
      return b64encode(hasher.digest()).decode("ascii")
function_tokens: def aws_md5 ( data ) : hasher = hashlib . new ( "md5" ) if hasattr ( data , "read" ) : data . seek ( 0 ) while True : chunk = data . read ( 8192 ) if not chunk : break hasher . update ( chunk ) data . seek ( 0 ) else : hasher . update ( data ) return b64encode ( hasher . digest ( ) ) . decode ( "ascii" )