marko/encryption-openssl

OpenSSL encryption driver for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-encryption-openssl

Type:marko-module

pkg:composer/marko/encryption-openssl

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

0.0.1 2026-03-25 17:53 UTC

This package is auto-updated.

Last update: 2026-03-25 21:07:43 UTC


README

OpenSSL encryption driver --- encrypts and decrypts data using AES-256-GCM with authenticated encryption.

Installation

composer require marko/encryption-openssl

Requires the ext-openssl PHP extension. Automatically installs marko/encryption.

Quick Example

use Marko\Encryption\Contracts\EncryptorInterface;

class SecureStorage
{
    public function __construct(
        private EncryptorInterface $encryptor,
    ) {}

    public function store(string $sensitiveData): string
    {
        return $this->encryptor->encrypt($sensitiveData);
    }

    public function retrieve(string $encrypted): string
    {
        return $this->encryptor->decrypt($encrypted);
    }
}

Documentation

Full usage, API reference, and examples: marko/encryption-openssl