marko / encryption
Encryption contracts for Marko Framework
0.0.2
2026-03-26 16:28 UTC
Requires
- php: ^8.5
- marko/config: 0.0.2
- marko/core: 0.0.2
Requires (Dev)
- marko/testing: 0.0.2
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-26 16:43:24 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