Module Expr Str Assign NameStore Str Import alias Import alias Import alias Import alias TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body Raise Import alias Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body Return NameLoad If CompareGt Call AttributeLoad NameLoad attr Str Num body Return BinOpAdd Str NameLoad Return BinOpAdd Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr Num body Raise Call NameLoad BinOpMod Str NameLoad If CompareGt AttributeLoad NameLoad attr Num body Raise Call NameLoad BinOpMod Str NameLoad Return Call AttributeLoad NameLoad attr Num decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot NameLoad body Return NameLoad Return Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list Assign NameStore Str Assign NameStore Str Assign NameStore BinOpMod Str NameLoad Assign NameStore BinOpMod Str NameLoad TryExcept body Assign NameStore AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body FunctionDef arguments args NameParam NameParam defaults body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad decorator_list Expr Call NameLoad Str NameLoad Expr Call NameLoad Str NameLoad Expr Call NameLoad Str Str ClassDef bases NameLoad body Expr Str Assign NameStore Str Assign NameStore Call NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr BinOpAdd BinOpAdd BinOpAdd NameLoad Str NameLoad Str For NameStore NameLoad body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareEq SubscriptLoad NameLoad Index Str Str Assert CompareEq SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq NameLoad Str body Assign NameStore Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq NameLoad Str body Raise Call NameLoad BinOpMod Str NameLoad Return Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad NameLoad attr Str attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq NameLoad Str body Raise Call NameLoad BinOpMod Str NameLoad Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If CompareNotEq NameLoad Str body Raise Call NameLoad BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad Call AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str orelse If CompareEq AttributeLoad Call AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str body Assign NameStore Call AttributeLoad NameLoad attr orelse Raise Call NameLoad Str FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr NameLoad Str NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Return Call NameLoad keyword Call NameLoad AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str keyword Call AttributeLoad NameLoad attr Str keyword Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str keyword Call NameLoad Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults Call NameLoad kwarg body Expr Str TryExcept body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr orelse Raise Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad body Raise Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad NameLoad Str If CompareNotEq AttributeLoad NameLoad attr Str body Raise Call NameLoad NameLoad BinOpMod Str AttributeLoad NameLoad attr If CompareNotEq AttributeLoad NameLoad attr Str body Raise Call NameLoad NameLoad BinOpMod Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assert AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr Assert CompareIn Str NameLoad Assert CompareIn Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr SubscriptLoad NameLoad Index Str orelse If AttributeLoad NameLoad attr body If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad NameLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert AttributeLoad NameLoad attr Return BinOpSub AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert AttributeLoad NameLoad attr Assert AttributeLoad NameLoad attr Assert Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assert Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Num body Expr Str Assert AttributeLoad NameLoad attr If NameLoad body Assign NameStore Str orelse Assign NameStore Str AugAssignAdd NameStore Str Assign NameStore BinOpMod NameLoad TupleLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Num AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Num Assign NameStore Str For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body AugAssignAdd NameStore BinOpAdd BinOpAdd BinOpMult Str NameLoad NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad Num body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assert CompareEq AttributeLoad Call AttributeLoad NameLoad attr attr BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr BinOpAdd NameLoad Num Num Assign AttributeStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Str attr BinOpAdd Str Call NameLoad AttributeLoad NameLoad attr BinOpAdd NameLoad Num Num Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpDiv NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Str Assign NameStore Str For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body If CompareNotEq Call AttributeLoad NameLoad attr Str body AugAssignAdd NameStore BinOpAdd BinOpAdd BinOpMult Str NameLoad NameLoad Str If NameLoad body Assign NameStore BinOpAdd Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str Assign NameStore BinOpAdd Str BinOpMult NameLoad Str If Call NameLoad NameLoad body If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr BinOpAdd NameLoad Str If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad BinOpAdd NameLoad Num If BoolOpOr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr NameLoad orelse If BoolOpAnd NameLoad BoolOpOr UnaryOpNot AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpSub NameLoad NameLoad Assign NameStore Str For NameStore Call NameLoad Num Call NameLoad NameLoad NameLoad body If NameLoad body AugAssignAdd NameStore Str AugAssignAdd NameStore BinOpAdd BinOpMult Str NameLoad SubscriptLoad NameLoad Slice NameLoad BinOpAdd NameLoad NameLoad Return NameLoad decorator_list
N/A N/A Implementation of Magic Signatures protocol.

See Magic Signatures RFC for specification.  This module
implements the Magic Signature API on top of the crypto
layer in magicsigalg.py, hiding the low level crypto details.
 N/A __author__ jpanzer@google.com (John Panzer) N/A base64 N/A re N/A sys N/A time N/A N/A N/A xml.etree.ElementTree et N/A N/A N/A ImportError N/A N/A N/A N/A elementtree et N/A N/A N/A ImportError N/A N/A N/A magicsigalg N/A _WHITESPACE_RE N/A N/A re compile \s+ Error N/A Exception N/A N/A Error thrown for generic magic envelope failures. __init__ N/A N/A self N/A N/A N/A N/A N/A Exception __init__ self N/A N/A NormalizeUserIdToUri N/A N/A userid N/A N/A N/A Normalizes a user-provided user id to a reasonable guess at a URI. N/A userid N/A N/A userid strip N/A N/A N/A N/A userid startswith http: N/A N/A userid startswith https: N/A N/A userid startswith acct: N/A N/A userid N/A N/A N/A N/A userid find @ 0 N/A N/A N/A acct: userid N/A N/A http:// userid N/A _GetElementByTagName N/A N/A e ns tag_name N/A N/A N/A Retrieves a unique element from a DOM subtree by name.

  Convenience wrapper for the case where the format
  dictates exactly-once semantics.

  Args:
    e: Root element of DOM subtree.
    ns: Namespace of desired element.
    tag_name: Name of desired element.
  Raises:
    ValueError: If the element was not unique or not found.
  Returns:
    The desired element.
   N/A seq N/A N/A e getElementsByTagNameNS N/A unicode ns N/A unicode tag_name N/A N/A N/A seq length 0 N/A N/A N/A ValueError N/A Element %s not found tag_name N/A N/A N/A seq length 1 N/A N/A N/A ValueError N/A Element %s appears multiple times tag_name N/A N/A N/A seq item 0 N/A KeyRetriever N/A object N/A N/A Retrieves public or private keys for a signer identifier (URI). LookupPublicKey N/A N/A self signer_uri N/A N/A N/A N/A signer_uri N/A N/A None N/A RSA.mVgY8RN6URBTstndvmUUPb4UZTdwvwmddSKE5z_jvKUEK6yk1u3rrC9yN8k6FilGj9K0eeUPe2hf4Pj-5CmHww==.AQAB.Lgy_yL3hsLBngkFdDw1Jy9TmSRMiH6yihYetQ8jy-jZXdsZXd8V5ub3kuBHHk4M39i3TduIkcrjcsiWQb77D8Q== N/A LookupPrivateKey N/A N/A self signer_uri N/A N/A N/A Look up signing key for a given signer URI. N/A N/A N/A self LookupPublicKey signer_uri N/A N/A N/A _ATOM_NS_URL http://www.w3.org/2005/Atom N/A _ME_NS_URL http://salmon-protocol.org/ns/magic-env N/A _ATOM_NS N/A {%s} _ATOM_NS_URL N/A _ME_NS N/A {%s} _ME_NS_URL N/A N/A N/A __register_namespace N/A et register_namespace N/A N/A N/A AttributeError N/A __register_namespace N/A N/A prefix uri N/A N/A N/A N/A N/A et _namespace_map N/A uri prefix N/A N/A N/A __register_namespace atom _ATOM_NS_URL N/A N/A __register_namespace me _ME_NS_URL N/A N/A __register_namespace thr http://purl.org/syndication/thread/1.0 MagicEnvelopeProtocol N/A object N/A N/A Implementation of Magic Envelope protocol. N/A ENCODING base64url N/A key_retriever N/A KeyRetriever GetPrivateKey N/A N/A self signer_uri N/A N/A N/A Retrieves private signing key to be used. N/A N/A N/A N/A self key_retriever LookupPrivateKey signer_uri N/A GetPublicKey N/A N/A self signer_uri N/A N/A N/A Retrieves public key to be used to verify signatures for signer. N/A N/A N/A N/A self key_retriever LookupPublicKey signer_uri N/A GetSignerURI N/A N/A self data N/A N/A N/A Grabs signer == first author from given message.

    Currently we're assuming most messages are single author
    and punting on what it means to sign a multi-author
    message.  We only look at the first (lexical) author
    in the input and act as if that is the only author.

    Args:
      data: The message, either pre-parsed or a string.
    Returns:
      The URI of the author of the message.
     N/A N/A isinstance data N/A et ElementTree N/A N/A d data N/A N/A d N/A N/A et ElementTree N/A data N/A N/A N/A type data unicode N/A N/A data encode utf8 data N/A N/A N/A d _setroot N/A N/A et XML data N/A auth_uris N/A N/A N/A N/A d getroot findall N/A N/A N/A _ATOM_NS author/ _ATOM_NS uri N/A u auth_uris N/A N/A N/A NormalizeUserIdToUri N/A u text N/A IsAllowedSigner N/A N/A self data userid_uri N/A N/A N/A Checks that userid_uri is identified as an allowed signer.

    Note that this does not do a signature check.

    Args:
      data: The message, either pre-parsed or a string.
      userid_uri: The URI of the author to be checked.
    Returns:
      True iff userid_uri is identified as the first author.
     N/A N/A N/A N/A self GetSignerURI data userid_uri N/A Verify N/A N/A self env N/A N/A N/A Verifies magic envelope data.

    Checks that its signature matches the contents and that the
    author's public key generated the signature.

    Args:
      env: The magic envelope data in dict form (section 3.1 of spec)
    Returns:
      True iff the signature is verified.
     N/A N/A N/A env N/A alg RSA-SHA256 N/A N/A N/A env N/A encoding N/A self ENCODING N/A text N/A N/A base64 urlsafe_b64decode N/A N/A N/A env N/A data encode utf-8 N/A signer_uri N/A N/A self GetSignerURI text N/A verifier N/A N/A magicsigalg SignatureAlgRsaSha256 N/A N/A self GetKeypair signer_uri N/A N/A N/A verifier Verify N/A env N/A data N/A env N/A sig N/A GetSigningAlg N/A N/A self signing_key N/A N/A N/A Returns algorithm to use for signing messages.

    Args:
      signing_key: Keypair to use to construct the algorithm.
    Returns:
      An algorithm object that can be used to sign byte sequences.
     N/A N/A signing_key TEST N/A N/A signing_key RSA.mVgY8RN6URBTstndvmUUPb4UZTdwvwmddSKE5z_jvKUEK6yk1u3rrC9yN8k6FilGj9K0eeUPe2hf4Pj-5CmHww==.AQAB.Lgy_yL3hsLBngkFdDw1Jy9TmSRMiH6yihYetQ8jy-jZXdsZXd8V5ub3kuBHHk4M39i3TduIkcrjcsiWQb77D8Q== N/A N/A N/A magicsigalg SignatureAlgRsaSha256 signing_key N/A GetVerifierAlg N/A N/A self public_key N/A N/A N/A Returns algorithm to use for verifying messages.

    Args:
      public_key: Public key to use to construct the algorithm.
    Returns:
      An algorithm object that can be used to sign byte sequences.
     N/A N/A N/A magicsigalg SignatureAlgRsaSha256 public_key N/A EncodeData N/A N/A self raw_text_data encoding N/A N/A N/A Encodes raw data into an armored form.

    Args:
      raw_text_data: Textual data to be encoded; should be in utf-8 form.
      encoding: Encoding to use (must be base64url)
    Raises:
      ValueError: The encoding is unknown or missing.
    Returns:
      The encoded data in the specified format.
     N/A N/A encoding base64url N/A N/A N/A ValueError N/A Unknown encoding %s encoding N/A N/A N/A N/A N/A base64 urlsafe_b64encode N/A N/A N/A unicode raw_text_data encode utf-8 encode utf-8 N/A DecodeData N/A N/A self encoded_text_data encoding N/A N/A N/A Decodes armored data into raw text form.

    Args:
      encoded_text_data: Armored data to be decoded.
      encoding: Encoding to use.
    Raises:
      ValueError: If the encoding is unknown.
    Returns:
      The raw decoded text as a string.
     N/A N/A encoding base64url N/A N/A N/A ValueError N/A Unknown encoding %s encoding N/A N/A N/A base64 urlsafe_b64decode N/A N/A encoded_text_data encode utf-8 N/A ParseData N/A N/A self raw_text_data mime_type N/A N/A N/A Parses the payload of a magic envelope's data field.

    Args:
      raw_text_data: Data in given MIME type.
      mime_type: Type of the textual data.  application/atom+xml supported
    Raises:
      ValueError: The input format was unrecognized or badly formed.
    Returns:
      Parsed data suitable for passing in to other methods of this object.
     N/A N/A mime_type application/atom+xml N/A N/A N/A ValueError N/A Unknown MIME type %s mime_type N/A d N/A N/A et ElementTree N/A raw_text_data N/A N/A N/A type raw_text_data unicode N/A N/A raw_text_data encode utf8 raw_text_data N/A N/A N/A d _setroot N/A N/A et XML raw_text_data N/A d N/A Parse N/A N/A self textinput mime_type N/A application/magic-envelope+xml N/A N/A Parses a magic envelope.

    Args:
      textinput: Input message in either application/magic-envelope
        or application/atom format.
      mime_type: MIME type of textinput data.
    Raises:
      ValueError: The input format was unrecognized or badly formed.
    Returns:
      Magic envelope fields in dict format per section 3.1 of spec.
     N/A ns http://salmon-protocol.org/ns/magic-env N/A d N/A N/A et ElementTree N/A textinput N/A N/A textinput strip N/A textinput N/A N/A N/A type textinput unicode N/A N/A textinput encode utf8 textinput N/A N/A N/A d _setroot N/A N/A et XML textinput N/A N/A N/A N/A N/A d getroot tag N/A _ATOM_NS entry N/A N/A env_el N/A N/A d find N/A _ME_NS provenance N/A N/A N/A N/A N/A N/A d getroot tag N/A _ME_NS env N/A N/A env_el N/A N/A d getroot N/A N/A N/A ValueError Unrecognized input format Squeeze N/A N/A s N/A N/A N/A N/A N/A re sub _WHITESPACE_RE s N/A N/A data_el N/A N/A env_el find N/A _ME_NS data N/A N/A dict data N/A Squeeze N/A data_el text encoding N/A N/A env_el findtext N/A _ME_NS encoding data_type N/A N/A data_el get type alg N/A N/A env_el findtext N/A _ME_NS alg sig N/A Squeeze N/A N/A env_el findtext N/A _ME_NS sig N/A N/A EnvelopeError N/A Error N/A N/A Error thrown on failure to initialize an Envelope. N/A invalid_envelope None N/A error_text None N/A context None __init__ N/A N/A self envelope err context N/A None N/A N/A N/A self invalid_envelope envelope N/A N/A self error_text err N/A N/A self context context N/A N/A N/A Error __init__ self N/A __str__ N/A N/A self N/A N/A N/A N/A <magicsig.Error "%s" for envelope %s (prior exception: %s)> N/A N/A self error_text N/A self invalid_envelope N/A self context N/A N/A Envelope N/A object N/A N/A Represents a Magic Envelope. N/A _data None N/A _data_type None N/A _encoding None N/A _alg None N/A _sig None N/A _parsed_data None N/A _signer_uri None N/A _signer_key None N/A _init_timestamp None __init__ N/A N/A self protocol N/A N/A MagicEnvelopeProtocol kwargs N/A N/A Initializes an envelope from arbitrary input. N/A N/A N/A N/A self _protocol protocol N/A N/A N/A self _Initialize kwargs N/A N/A self _sig N/A N/A N/A N/A self _PerformVerification N/A N/A N/A self _signer_key N/A N/A N/A N/A self _Sign N/A N/A N/A EnvelopeError self Can neither verify nor sign envelope N/A N/A N/A EnvelopeError N/A N/A N/A N/A self _init_timestamp N/A N/A time time N/A _Initialize N/A N/A self kwargs N/A N/A N/A Initializes envelope data from input. N/A N/A self _mime_type N/A N/A kwargs get mime_type None N/A N/A self _document N/A N/A kwargs get document None N/A N/A self _document N/A N/A fields N/A N/A N/A self _protocol Parse N/A self _document N/A self _mime_type N/A N/A N/A kwargs update fields N/A N/A self _data N/A N/A kwargs get data None N/A N/A self _data_type N/A N/A kwargs get data_type None N/A N/A self _encoding N/A N/A kwargs get encoding base64url N/A N/A self _alg N/A N/A kwargs get alg RSA-SHA256 N/A N/A self _sig N/A N/A kwargs get sig None N/A N/A N/A self _data_type N/A N/A N/A EnvelopeError self Missing data_type N/A N/A N/A self _alg RSA-SHA256 N/A N/A N/A EnvelopeError self N/A Unknown alg %s; must be RSA-SHA256 N/A self _alg N/A N/A N/A self _encoding base64url N/A N/A N/A EnvelopeError self N/A Unknown encoding %s; must be base64url N/A self _encoding N/A raw_data N/A N/A kwargs get raw_data_to_sign None N/A raw_data N/A N/A N/A self _data_type N/A N/A N/A self _sig N/A N/A N/A self _data N/A N/A signer_uri kwargs N/A N/A signer_key kwargs N/A N/A self _parsed_data N/A N/A N/A self _protocol ParseData raw_data N/A self _data_type N/A N/A self _data N/A N/A N/A self _protocol EncodeData raw_data N/A self _encoding N/A N/A self _signer_uri N/A kwargs N/A signer_uri N/A N/A self _signer_key N/A kwargs N/A signer_key N/A N/A N/A self _sig N/A N/A N/A N/A self _data N/A N/A N/A EnvelopeError self No data to verify N/A raw_data N/A N/A N/A self _protocol DecodeData N/A self _data N/A self _encoding N/A N/A N/A EnvelopeError self Insufficient data to initialize envelope. N/A N/A self _parsed_data N/A N/A N/A self _protocol ParseData raw_data N/A self _data_type N/A N/A self _init_timestamp None N/A Age N/A N/A self N/A N/A N/A Age of object since successful verification. N/A N/A self _init_timestamp N/A N/A N/A self _init_timestamp N/A N/A time time N/A _Sign N/A N/A self N/A N/A N/A Signs an envelope given appropriate key inputs. N/A N/A self _signer_uri N/A N/A self _signer_key N/A N/A N/A N/A self _protocol IsAllowedSigner N/A self _parsed_data N/A self _signer_uri N/A signature_alg N/A N/A N/A self _protocol GetSigningAlg N/A self _signer_key N/A N/A self _sig N/A N/A signature_alg Sign N/A self _data N/A N/A self _alg N/A N/A signature_alg GetName N/A N/A N/A signature_alg Verify N/A self _data N/A self _sig N/A _PerformVerification N/A N/A self N/A N/A N/A Performs signature verification on parsed data. N/A text N/A N/A base64 urlsafe_b64decode N/A N/A N/A self _data encode utf-8 N/A N/A self _parsed_data N/A N/A N/A self _protocol ParseData text N/A self _data_type N/A N/A self _signer_uri N/A N/A N/A self _protocol GetSignerURI N/A self _parsed_data N/A N/A self _signer_public_key N/A N/A N/A self _protocol GetPublicKey N/A self _signer_uri N/A verifier N/A N/A N/A self _protocol GetVerifierAlg N/A self _signer_public_key N/A N/A N/A N/A verifier Verify N/A self _data N/A self _sig N/A N/A N/A EnvelopeError self Signature verification failed. N/A ToXML N/A N/A self fulldoc indentation N/A True 0 N/A N/A Turns envelope into serialized XML suitable for transmission.

    Args:
      fulldoc: Return a full XML document with <?xml...
      indentation: Indent each line this number of spaces.
    Returns:
      An XML document or fragment in string form.
     N/A N/A self _init_timestamp N/A fulldoc N/A N/A template <?xml version='1.0' encoding='UTF-8'?> N/A N/A template N/A template 
<me:env xmlns:me='http://salmon-protocol.org/ns/magic-env'>
  <me:encoding>%s</me:encoding>
  <me:data type='application/atom+xml'>
%s
  </me:data>
  <me:alg>%s</me:alg>
  <me:sig>
%s
  </me:sig>
</me:env>
 N/A text N/A template N/A N/A self _encoding N/A _ToPretty N/A self _data 4 60 N/A self _alg N/A _ToPretty N/A self _sig 4 60 N/A indented_text N/A line N/A N/A N/A N/A text strip split N/A N/A indented_text N/A N/A N/A indentation line N/A indented_text N/A ToAtom N/A N/A self fulldoc indentation N/A True 0 N/A N/A Turns envelope into serialized Atom entry.

    Args:
      fulldoc: Return a full XML document with <?xml...
      indentation: Indent each line this number of spaces.
    Returns:
      An Atom entry XML document with an me:provenance element
      containing the original magic signature data.
     N/A N/A N/A self _parsed_data N/A N/A N/A self _parsed_data N/A N/A N/A self _protocol ParseData text N/A self _data_type N/A d N/A self _parsed_data N/A N/A N/A N/A N/A d getroot tag N/A _ATOM_NS entry N/A prov_el N/A N/A et Element N/A _ME_NS provenance N/A data_el N/A N/A et SubElement prov_el N/A _ME_NS data N/A N/A N/A data_el set type N/A self _data_type N/A N/A data_el text N/A N/A _ToPretty N/A self _data N/A indentation 6 60 N/A N/A N/A N/A et SubElement prov_el N/A _ME_NS encoding text N/A self _encoding N/A N/A N/A N/A et SubElement prov_el N/A _ME_NS sig text N/A N/A _ToPretty N/A self _sig N/A indentation 6 60 N/A N/A N/A N/A N/A d getroot append prov_el N/A N/A N/A self _PrettyIndent N/A N/A d getroot N/A indentation 2 N/A text N/A N/A et tostring N/A N/A d getroot encoding utf-8 N/A indented_text N/A line N/A N/A N/A N/A text strip split N/A N/A N/A N/A N/A line strip N/A N/A indented_text N/A N/A N/A indentation line N/A fulldoc N/A N/A indented_text N/A <?xml version='1.0' encoding='UTF-8'?>
 indented_text N/A indented_text N/A GetData N/A N/A self N/A N/A N/A Returns envelope's verified data. N/A N/A N/A N/A self _protocol Decode N/A self _data N/A self _encoding N/A GetParsedData N/A N/A self N/A N/A N/A Returns envelope's verified data in parsed form. N/A N/A N/A self _parsed_data N/A N/A N/A self _parsed_data N/A N/A N/A self _protocol ParseData N/A N/A N/A self _protocol Decode N/A self _data N/A self _data_type N/A N/A self _parsed_data N/A GetDataWithProvenance N/A N/A self N/A N/A N/A Returns envelope's data as a string with provenance attached. N/A GetParsedDataWithProvenance N/A N/A self N/A N/A N/A Returns data with provenance in parsed form. N/A _PrettyIndent N/A N/A self elem level N/A 0 N/A N/A Prettifies an element tree in-place N/A i N/A N/A level N/A N/A len elem N/A N/A N/A N/A N/A elem text N/A N/A N/A N/A elem text strip N/A N/A N/A elem text N/A i N/A N/A N/A N/A elem tail N/A N/A N/A N/A elem tail strip N/A N/A N/A elem tail i N/A elem elem N/A N/A N/A N/A self _PrettyIndent elem N/A level 1 N/A N/A N/A N/A elem tail N/A N/A N/A N/A elem tail strip N/A N/A N/A elem tail i N/A N/A N/A level N/A N/A N/A elem tail N/A N/A N/A N/A elem tail strip N/A N/A N/A elem tail i N/A N/A _ToPretty N/A N/A text indent linelength N/A N/A N/A Makes huge text lines pretty, or at least printable. N/A tl N/A linelength indent N/A output N/A i N/A range 0 N/A len text tl N/A N/A output N/A N/A output N/A output N/A N/A indent N/A text N/A i N/A i tl N/A output N/A