def decrypt(self, message):
if not message:<EOL><INDENT>return None<EOL><DEDENT>try:<EOL><INDENT>memo_wif = self.blockchain.wallet.getPrivateKeyForPublicKey(message["<STR_LIT:to>"])<EOL>pubkey = message["<STR_LIT>"]<EOL><DEDENT>except KeyNotFound:<EOL><INDENT>try:<EOL><INDENT>memo_wif = self.blockchain.wallet.getPrivateKeyForPublicKey(<EOL>message["<STR_LIT>"]<EOL>)<EOL>pubkey = message["<STR_LIT:to>"]<EOL><DEDENT>except KeyNotFound:<EOL><INDENT>raise MissingKeyError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format([message["<STR_LIT:to>"], message["<STR_LIT>"]])<EOL>)<EOL><DEDENT><DEDENT>if not hasattr(self, "<STR_LIT>"):<EOL><INDENT>self.chain_prefix = self.blockchain.prefix<EOL><DEDENT>return memo.decode_memo(<EOL>self.privatekey_class(memo_wif),<EOL>self.publickey_class(pubkey, prefix=self.chain_prefix),<EOL>message.get("<STR_LIT>"),<EOL>message.get("<STR_LIT:message>"),<EOL>)<EOL>
Decrypt a message

            :param dict message: encrypted memo message
            :returns: decrypted message
            :rtype: str