File: test/SignatureTest.php

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  Easy PHP RSA Library  >  test/SignatureTest.php  >  Download  
File: test/SignatureTest.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Easy PHP RSA Library
RSA data encryption and decryption using phpseclib
Author: By
Last change:
Date: 2 months ago
Size: 515 bytes


Class file image Download
use \ParagonIE\EasyRSA\EasyRSA;
use \

SignatureTest extends PHPUnit_Framework_TestCase
    public function
$keyPair = KeyPair::generateKeyPair(2048);
$secretKey = $keyPair->getPrivateKey();
$publicKey = $keyPair->getPublicKey();
$plain = 'This is a message.';
$signature = EasyRSA::sign($plain, $secretKey);
$this->assertTrue(EasyRSA::verify($plain, $signature, $publicKey));

For more information send a message to info at phpclasses dot org.