Fix PHP code that encrypts and decrypts using private/public key
$30-50 USD
İptal edildi
İlan edilme: 12 yıldan fazla önce
$30-50 USD
Teslimde ödenir
I have some (PHP) code that RSA encrypts some text. The code works fine but only on a small file. I want it to encrypt an entire file some K in size without simply repeatedly exor-ing (etc.) the file to get an encrypted file. It MUST be encrypted using private key and decrypted with public key, but beyond that I am open to suggestions. Ideally I would like the code in PHP, but I will consider C, Python or Perl
## Deliverables
Follows is the output if the file is above a few hundred bytes. If it is less, then I get success and the encryption and decryption appear to go to plan.
Private key Resource id #4
Public Key-----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDaXbAI4Bd+0gL0z/0FmI3eYv88 4qpPDfjS0cSvpHA9IHceIuKnpbHCoOfcssMXoRh+YwbAahgRIfqRTGrWItIfh3km fd5MjJrCtSUFtPbw7nwM2Jvq5xKOpCfUe+Yox7c/OTLLWNy7SudUElKmmbV3pBLl fip+OcDzu3AoTkNW0QIDAQAB -----END PUBLIC KEY-----
failureerror:04067072:rsa routines:RSA_EAY_PUBLIC_DECRYPT:padding check failed
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0906D06C:PEM routines:PEM_read_bio:no start line
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0E06D06C:configuration file routines:NCONF_get_string:no value
error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too large for key size
done