mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-26 06:59:49 +05:30
27 lines
525 B
PHP
27 lines
525 B
PHP
|
<?php
|
||
|
|
||
|
namespace LeagueTests\Stubs;
|
||
|
|
||
|
use League\OAuth2\Server\CryptTrait;
|
||
|
|
||
|
class CryptTraitStub
|
||
|
{
|
||
|
use CryptTrait;
|
||
|
|
||
|
public function __construct()
|
||
|
{
|
||
|
$this->setPrivateKeyPath('file://' . __DIR__ . '/private.key');
|
||
|
$this->setPublicKeyPath('file://' . __DIR__ . '/public.key');
|
||
|
}
|
||
|
|
||
|
public function doEncrypt($unencryptedData)
|
||
|
{
|
||
|
return $this->encrypt($unencryptedData);
|
||
|
}
|
||
|
|
||
|
public function doDecrypt($encryptedData)
|
||
|
{
|
||
|
return $this->decrypt($encryptedData);
|
||
|
}
|
||
|
}
|