RSA.php
Pure-PHP PKCS#1 (v2.1) compliant implementation of RSA.
PHP version 5
Here's an example of how to encrypt and decrypt text with this library:
Here's an example of how to create signatures and verify signatures with this library:
One thing to consider when using this: so phpseclib uses PSS mode by default. Technically, id-RSASSA-PSS has a different key format than rsaEncryption. So should phpseclib save to the id-RSASSA-PSS format by default or the rsaEncryption format? For stand-alone keys I figure rsaEncryption is better because SSH doesn't use PSS and idk how many SSH servers would be able to decode an id-RSASSA-PSS key. For X.509 certificates the id-RSASSA-PSS format is used by default (unless you change it up to use PKCS1 instead)
Tags
Table of Contents
Classes
- RSA
- Pure-PHP PKCS#1 compliant implementation of RSA.