You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
563 B
32 lines
563 B
<?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);
|
|
}
|
|
}
|