oauth2-server/tests/Stubs/CryptTraitStub.php
2016-03-28 16:42:34 +02:00

28 lines
580 B
PHP

<?php
namespace LeagueTests\Stubs;
use League\OAuth2\Server\CryptKey;
use League\OAuth2\Server\CryptTrait;
class CryptTraitStub
{
use CryptTrait;
public function __construct()
{
$this->setPrivateKey(new CryptKey('file://' . __DIR__ . '/private.key'));
$this->setPublicKey(new CryptKey('file://' . __DIR__ . '/public.key'));
}
public function doEncrypt($unencryptedData)
{
return $this->encrypt($unencryptedData);
}
public function doDecrypt($encryptedData)
{
return $this->decrypt($encryptedData);
}
}