2016-03-17 21:18:28 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace LeagueTests\Stubs;
|
|
|
|
|
2016-03-28 16:42:34 +02:00
|
|
|
use League\OAuth2\Server\CryptKey;
|
2016-03-17 21:18:28 +01:00
|
|
|
use League\OAuth2\Server\CryptTrait;
|
|
|
|
|
|
|
|
class CryptTraitStub
|
|
|
|
{
|
|
|
|
use CryptTrait;
|
|
|
|
|
|
|
|
public function __construct()
|
|
|
|
{
|
2017-07-01 18:11:19 +01:00
|
|
|
$this->setEncryptionKey(base64_encode(random_bytes(36)));
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getKey()
|
|
|
|
{
|
|
|
|
return $this->encryptionKey;
|
2016-03-17 21:18:28 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function doEncrypt($unencryptedData)
|
|
|
|
{
|
|
|
|
return $this->encrypt($unencryptedData);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function doDecrypt($encryptedData)
|
|
|
|
{
|
|
|
|
return $this->decrypt($encryptedData);
|
|
|
|
}
|
|
|
|
}
|