:mod:`vizbase.memo` =================== .. py:module:: vizbase.memo Module Contents --------------- .. function:: init_aes(shared_secret, nonce) Initialize AES instance. :param hex shared_secret: Shared Secret to use as encryption key :param int nonce: Random nonce :return: AES instance and checksum of the encryption key :rtype: length 2 tuple .. function:: encode_memo(priv, pub, nonce, message, **kwargs) 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 .. function:: decode_memo(priv, message) Decode a message with a shared secret between Alice and Bob. :param PrivateKey priv: Private Key (of Bob) :param base58encoded message: Encrypted Memo message :return: Decrypted message :rtype: str :raise ValueError: if message cannot be decoded as valid UTF-8 string .. function:: involved_keys(message) decode structure. .. function:: _pad(raw_message, bs) .. function:: _unpad(raw_message, bs)