Download the PHP package bravist/pikirasa without Composer
On this page you can find all versions of the php package bravist/pikirasa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bravist/pikirasa
More information about bravist/pikirasa
Files in bravist/pikirasa
Package pikirasa
Short Description PKI public/private RSA key encryption using the OpenSSL extension
License BSD
Homepage https://github.com/bravist/pikirasa
Informations about the package pikirasa
Pikirasa
1.0.5 release
Supports encrypted string more than 117. see openssl_private_encrypt can encrypt a maximum of 117 chars at one time
Easy PKI public/private RSA key encryption using the OpenSSL extension.
What's up with the name?
Pikirasa is just "PKI RSA" with a few exta vowels thrown in. Also, I created this project late on a Friday night, so I just couldn't bring myself to name it anything serious.
What is this for?
Pikirasa is very lightweight wrapper around PHP's OpenSSL extension for encrypting and decrypting data with a known public/private key pair. It requires that you have the OpenSSL extension installed, and that your certificates have already been generated.
Pikirasa is not a general purpose or all-encompassing encryption library. If you need more encryption options, maximum system compatability, or if you need to generate RSA keys programatically, take a look at phpseclib.
Example Usage
All your need is the full path to your public and/or private key files:
Under the hood, Pikirasa will make these paths file streams, and you may use any file stream directly instead :
You can also use the string contents of your public and private keys :
Using Certificates with a Passphrase
The Pikirasa\RSA
class accepts an optional 3rd parameter if your private key
is protected with a password.
Working with base64-encoded strings
A common pattern if you want to deal with plain strings rather than binary data
is to encode encryped data with base64. If you need to do that, both encrypt
and decrypt
have a base64 counterpart you can use :
encrypt a maximum of 117 chars at one time
All versions of pikirasa with dependencies
ext-openssl Version *