von_anchor/wallet/wallet.py
async def encrypt(self, message: bytes, authn: bool = False, verkey: str = None) -> bytes:
        """
        Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
        Raise AbsentMessage for missing message, or WalletState if wallet is closed.

        :param message: plaintext, as bytes
        :param authn: whether to use authenticated encryption scheme
        :param verkey: verification key of recipient, None for anchor's own
        :return: ciphertext, as bytes
        """

        LOGGER.debug('Wallet.encrypt >>> message: %s, authn: %s, verkey: %s', message, authn, verkey)

        if not message:
            LOGGER.debug('Wallet.encrypt <!< No message to encrypt')
            raise AbsentMessage('No message to encrypt')

        if not self.handle:
            LOGGER.debug('Wallet.encrypt <!< Wallet %s is closed', self.name)
            raise WalletState('Wallet {} is closed'.format(self.name))

        if authn:
            rv = await crypto.auth_crypt(self.handle, self.verkey, verkey or self.verkey, message)
        else:
            rv = await crypto.anon_crypt(verkey or self.verkey, message)

        LOGGER.debug('Wallet.auth_encrypt <<< %s', rv)
        return rv

        Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
        Raise AbsentMessage for missing message, or WalletState if wallet is closed.

        :param message: plaintext, as bytes
        :param authn: whether to use authenticated encryption scheme
        :param verkey: verification key of recipient, None for anchor's own
        :return: ciphertext, as bytes
        
Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
Raise AbsentMessage for missing message, or WalletState if wallet is closed.
Encrypt plaintext for owner of DID anonymously or via authenticated encryption scheme . Raise AbsentMessage for missing message or WalletState if wallet is closed .
async def encrypt(self, message: bytes, authn: bool = False, verkey: str = None) -> bytes:
        LOGGER.debug('Wallet.encrypt >>> message: %s, authn: %s, verkey: %s', message, authn, verkey)
        if not message:
            LOGGER.debug('Wallet.encrypt <!< No message to encrypt')
            raise AbsentMessage('No message to encrypt')
        if not self.handle:
            LOGGER.debug('Wallet.encrypt <!< Wallet %s is closed', self.name)
            raise WalletState('Wallet {} is closed'.format(self.name))
        if authn:
            rv = await crypto.auth_crypt(self.handle, self.verkey, verkey or self.verkey, message)
        else:
            rv = await crypto.anon_crypt(verkey or self.verkey, message)
        LOGGER.debug('Wallet.auth_encrypt <<< %s', rv)
        return rv
async def encrypt ( self , message : bytes , authn : bool = False , verkey : str = None ) -> bytes : LOGGER . debug ( 'Wallet.encrypt >>> message: %s, authn: %s, verkey: %s' , message , authn , verkey ) if not message : LOGGER . debug ( 'Wallet.encrypt <!< No message to encrypt' ) raise AbsentMessage ( 'No message to encrypt' ) if not self . handle : LOGGER . debug ( 'Wallet.encrypt <!< Wallet %s is closed' , self . name ) raise WalletState ( 'Wallet {} is closed' . format ( self . name ) ) if authn : rv = await crypto . auth_crypt ( self . handle , self . verkey , verkey or self . verkey , message ) else : rv = await crypto . anon_crypt ( verkey or self . verkey , message ) LOGGER . debug ( 'Wallet.auth_encrypt <<< %s' , rv ) return rv
Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
Encrypt plaintext for owner of DID anonymously or via authenticated encryption scheme .
"""
        Encrypt plaintext for owner of DID, anonymously or via authenticated encryption scheme.
        Raise AbsentMessage for missing message, or WalletState if wallet is closed.

        :param message: plaintext, as bytes
        :param authn: whether to use authenticated encryption scheme
        :param verkey: verification key of recipient, None for anchor's own
        :return: ciphertext, as bytes
        """
ciphertext, as bytes
ciphertext as bytes
self
message
bytes
plaintext, as bytes
plaintext as bytes
authn
bool
whether to use authenticated encryption scheme
whether to use authenticated encryption scheme
verkey
str
verification key of recipient, None for anchor's own
verification key of recipient None for anchor ' s own