Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
Can we Encrypt data with private key in angular and Decrypt data with public key in PHP using RSA Encryption?

i'm trying to Encrypt data in using RSA Public Key in angular and Decrypt data with public key In php. i'm trying to Encrypt with JsEncrypt library in angular and Decrypt in Php Using

:openssl_public_decrypt($signature, $decrypted, $publicKey, OPENSSL_PKCS1_PADDING);

I need to resolve encryption and Decryption between Angular and Php.

Please see:

ANGULAR CODE

enc(data: any){  this.$encrypt.setPrivateKey(`dummyprivakey`);
        let ndata = this.$encrypt.encrypt(data);
    console.log("encrypt data ", ndata)
       return ndata
}

PHP CODE :

    openssl_public_decrypt ($encrypted, $decrypted , $publickey); 
       var_dump($decrypted);

I'm unable decode the data.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Actually this is possible - of course -. The question is: Why would you?

You - and you should always - send your request via HTTPS which means it's secured and encrypted.

So it's unnecessary work for the browser and the PHP code.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!