def RSA_encrypt(public_key, message):
<EOL>if not globals().get('<STR_LIT>'):<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>rsakey = RSA.importKey(public_key)<EOL>rsakey = PKCS1_v1_5.new(rsakey)<EOL>encrypted = rsakey.encrypt(message.encode())<EOL>return base64.encodestring(encrypted).decode().replace('<STR_LIT:\n>', '<STR_LIT>')<EOL>
用RSA加密字符串.

    public_key - 公钥
    message    - 要加密的信息, 使用UTF-8编码的字符串
    @return    - 使用base64编码的字符串