<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encrypt(self, binary, use_sign=True):
 """ Encrypt binary data. **中文文档** - 发送消息时只需要对方的pubkey - 如需使用签名, 则双方都需要持有对方的pubkey """

        token = rsa.encrypt(binary, self.his_pubkey)  # encrypt it
        if use_sign:
            self.sign = rsa.sign(binary, self.my_privkey, "SHA-1")  # sign it
        return token