code: async def encrypt(self, message: bytes, authn: bool = False, recip: str = None) -> bytes:
          
  
          LOGGER.debug('BaseAnchor.encrypt >>> message: %s, authn: %s, recip: %s', message, authn, recip)
  
          if not self.wallet.handle:
              LOGGER.debug('BaseAnchor.encrypt <!< Wallet %s is closed', self.name)
              raise WalletState('Wallet {} is closed'.format(self.name))
  
          rv = await self.wallet.encrypt(message, authn, await self._verkey_for(recip))
  
          LOGGER.debug('BaseAnchor.auth_encrypt <<< %s', rv)
          return rv
docs: Encrypt plaintext for owner of DID or verification key, anonymously or via
          authenticated encryption scheme. If given DID, first check wallet and then pool
          for corresponding verification key.
  
          Raise WalletState if the wallet is closed. Given a recipient DID not in the wallet,
          raise AbsentPool if the instance has no pool or ClosedPool if its pool is closed.
  
          :param message: plaintext, as bytes
          :param authn: whether to use authenticated encryption scheme
          :param recip: DID or verification key of recipient, None for anchor's own
          :return: ciphertext, as bytes