mirror of
https://github.com/elyby/oauth2-server.git
synced 2025-05-31 14:12:07 +05:30
CryptTrait tests
This commit is contained in:
26
tests/Stubs/CryptTraitStub.php
Normal file
26
tests/Stubs/CryptTraitStub.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user