PHP code example of jose-chan / rsa-sign

1. Go to this page and download the library: Download jose-chan/rsa-sign library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jose-chan / rsa-sign example snippets




use JoseChan\RsaSign\PrivateKey;
use JoseChan\RsaSign\Signature;

$private_key = new PrivateKey($key_string);

$sign = Signature::sign($string, $private_key);




use JoseChan\RsaSign\PublicKey;
use JoseChan\RsaSign\Signature;

$public_key = new PublicKey($key_string);

$result = Signature::verify($string, $sign, $public_key);