JoshKaufman / ursa

URSA - RSA public/private key OpenSSL bindings for Node.js
Other
618 stars 135 forks source link

cannot enc data #91

Closed calidion closed 9 years ago

calidion commented 9 years ago

Error: error:0407906E:rsa routines:RSA_padding_add_PKCS1_OAEP:data too large for key size

calidion commented 9 years ago

string needs to be encrypted.

private key is 2048 bit long modulus

_input_charset=utf-8&airticket=&body=没有什么可以更多的了&extern_token=&it_b_pay=90m&notify_url=http://api.t1bao.com/alipay/notify&otherfee=&out_trade_no=订单号:20150529142335-EJTG&partner=2088911456277187&payment_type=1&return_url=http://api.t1bao.com/alipay/callback&seller_id=renwenxin@t1bao.com&show_url=&subject=田一块小卖店的订单&total_fee=25.80

quartzjer commented 9 years ago

duplicate of #14

calidion commented 9 years ago

is there a way to encrypt a string without padding?

quartzjer commented 9 years ago

Try a streaming encryption like AES :)