marko / encryption
Encryption contracts for Marko Framework
0.0.1
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/config: 0.0.1
- marko/core: 0.0.1
Requires (Dev)
- marko/testing: 0.0.1
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-25 21:07:27 UTC
README
Interfaces for encryption--defines how data is encrypted and decrypted, not which cipher is used.
Installation
composer require marko/encryption
Note: You typically install a driver package (like marko/encryption-openssl) which requires this automatically.
Quick Example
use Marko\Encryption\Contracts\EncryptorInterface; class TokenService { public function __construct( private EncryptorInterface $encryptor, ) {} public function issueToken(array $payload): string { return $this->encryptor->encrypt( json_encode($payload, JSON_THROW_ON_ERROR), ); } }
Documentation
Full usage, API reference, and examples: marko/encryption