def encode_memo(priv, pub, nonce, message):
shared_secret = get_shared_secret(priv, pub)<EOL>aes = init_aes(shared_secret, nonce)<EOL>"<STR_LIT>"<EOL>raw = bytes(message, "<STR_LIT:utf8>")<EOL>checksum = hashlib.sha256(raw).digest()<EOL>raw = checksum[<NUM_LIT:0>:<NUM_LIT:4>] + raw<EOL>"<STR_LIT>"<EOL>raw = _pad(raw, <NUM_LIT:16>)<EOL>"<STR_LIT>"<EOL>return hexlify(aes.encrypt(raw)).decode("<STR_LIT:ascii>")<EOL>
Encode a message with a shared secret between Alice and Bob

        :param PrivateKey priv: Private Key (of Alice)
        :param PublicKey pub: Public Key (of Bob)
        :param int nonce: Random nonce
        :param str message: Memo message
        :return: Encrypted message
        :rtype: hex