mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
32 lines
563 B
PHP
32 lines
563 B
PHP
<?php
|
|
|
|
namespace LeagueTests\Stubs;
|
|
|
|
use League\OAuth2\Server\CryptKey;
|
|
use League\OAuth2\Server\CryptTrait;
|
|
|
|
class CryptTraitStub
|
|
{
|
|
use CryptTrait;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->setEncryptionKey(base64_encode(random_bytes(36)));
|
|
}
|
|
|
|
public function getKey()
|
|
{
|
|
return $this->encryptionKey;
|
|
}
|
|
|
|
public function doEncrypt($unencryptedData)
|
|
{
|
|
return $this->encrypt($unencryptedData);
|
|
}
|
|
|
|
public function doDecrypt($encryptedData)
|
|
{
|
|
return $this->decrypt($encryptedData);
|
|
}
|
|
}
|