code: def encrypt(self, s, mac_bytes=10):
          
          if isinstance(s, six.text_type):
              raise ValueError(
                  "Encode `s` to a bytestring yourself to" +
                  " prevent problems with different default encodings")
          out = BytesIO()
          with self.encrypt_to(out, mac_bytes) as f:
              f.write(s)
          return out.getvalue()
docs: Encrypt `s' for this pubkey.