def __init__(self, message=None, private_key=None, author_handle=None, payload=None,<EOL>public_key=None, sender_key_fetcher=None, verify=False, doc=None):
self._message = message<EOL>self.private_key = private_key<EOL>self.author_handle = author_handle<EOL>self.payload = payload<EOL>self.public_key = public_key<EOL>self.sender_key_fetcher = sender_key_fetcher<EOL>if payload:<EOL><INDENT>self.extract_payload()<EOL><DEDENT>elif doc is not None:<EOL><INDENT>self.doc = doc<EOL><DEDENT>else:<EOL><INDENT>self.doc = None<EOL><DEDENT>if verify:<EOL><INDENT>self.verify()<EOL><DEDENT>
All parameters are optional. Some are required for signing, some for opening.

:param message: Message string. Required to create a MagicEnvelope document.
:param private_key: Private key RSA object.
:param author_handle: Author signing the Magic Envelope, owns the private key.
:param payload: Magic Envelope payload as str or bytes.
:param public_key: Author public key in str format.
:param sender_key_fetcher: Function to use to fetch sender public key, if public key not given. Will fall back
    to network fetch of the profile and the key. Function must take handle as only parameter and return
    a public key string.
:param verify: Verify after creating object, defaults to False.
:param doc: MagicEnvelope document.