Files
laravel-gost-template/app/Services/Crypto/PdnCipher.php
2026-06-24 17:20:43 +09:00

29 lines
924 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Services\Crypto;
/**
* Контракт криптографического драйвера для защиты персональных данных.
*
* Мера ФСТЭК: ЗНИ (защита носителей информации), ОЦЛ.2.
* Абстракция позволяет менять реализацию (AES Laravel ↔ ГОСТ/КриптоПро)
* без изменения моделей и бизнес-логики (мера ЗИС.16).
*/
interface PdnCipher
{
/**
* Зашифровать значение.
*/
public function encrypt(string $plaintext): string;
/**
* Расшифровать значение.
*/
public function decrypt(string $ciphertext): string;
/**
* Идентификатор алгоритма (для аудита и маркировки).
*/
public function algorithm(): string;
}