20 lines
434 B
PHP
20 lines
434 B
PHP
|
<?php declare(strict_types=1);
|
||
|
|
||
|
namespace App\Services;
|
||
|
|
||
|
use App\Contracts\CryptographyContract;
|
||
|
use Illuminate\Support\Facades\Crypt;
|
||
|
|
||
|
final class CryptographyString implements CryptographyContract
|
||
|
{
|
||
|
public function encrypt(string $text): string
|
||
|
{
|
||
|
return Crypt::encryptString($text);
|
||
|
}
|
||
|
|
||
|
public function decrypt(string $encryptedText): string
|
||
|
{
|
||
|
return Crypt::decryptString($encryptedText);
|
||
|
}
|
||
|
}
|