vlucas / pikirasa

PKI public/private RSA key encryption using the OpenSSL extension
BSD 3-Clause "New" or "Revised" License
102 stars 21 forks source link

Error Call to undefined method Pikirasa\RSA::create() #17

Open ghost opened 4 years ago

ghost commented 4 years ago

Hello I'm trying to encrypt data in a Laravel app and I keep getting this error when trying to create new keys Error Call to undefined method Pikirasa\RSA::create()

My Controller code looks like this:


use Pikirasa\RSA;

class SiteMainController extends Controller
{
    public function mytestfun(Request $request)
    {
        $rsa = new Pikirasa\RSA('storage_path/to/nonexistent_public.pem', 'storage_path/to/nonexistent_private.pem');
        $rsa->create();

        //additional logic here ....

    }
}```

What my be causing this?
faizalv commented 4 years ago

There's no create method if you're using the 'latest' release, just clone the repo i guess.

acosonic commented 2 years ago

Yeah, same thing, worked once I replaced RSA.php

nouhailahanbali commented 1 year ago

what you mean by replace RSA.php ?