2016-03-18 01:48:28 +05:30
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace LeagueTests\Stubs;
|
|
|
|
|
2016-03-28 20:12:34 +05:30
|
|
|
use League\OAuth2\Server\CryptKey;
|
2016-03-18 01:48:28 +05:30
|
|
|
use League\OAuth2\Server\CryptTrait;
|
|
|
|
|
|
|
|
class CryptTraitStub
|
|
|
|
{
|
|
|
|
use CryptTrait;
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
2016-03-28 20:12:34 +05:30
|
|
|
$this->setPrivateKey(new CryptKey('file://' . __DIR__ . '/private.key'));
|
|
|
|
$this->setPublicKey(new CryptKey('file://' . __DIR__ . '/public.key'));
|
2016-03-18 01:48:28 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
public function doEncrypt($unencryptedData)
|
|
|
|
{
|
|
|
|
return $this->encrypt($unencryptedData);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function doDecrypt($encryptedData)
|
|
|
|
{
|
|
|
|
return $this->decrypt($encryptedData);
|
|
|
|
}
|
|
|
|
}
|