Search by

denosyscore / encryption

deondazy

Encryption services

Package info

github.com/denosyscore/encryption

pkg:composer/denosyscore/encryption

Statistics

Installs: 596

Dependents: 3

Suggesters: 0

Stars: 0

Open Issues: 0

v0.11.1 2026-11-12 06:22 UTC

This package is auto-updated.

Last update: 2026-11-12 06:25:14 UTC


README

Read-only split. This package is developed in denosyscore/framework under packages/encryption. Open issues and pull requests there.

Encryption services

Installation

composer require denosyscore/encryption

Quick start

Authenticated encryption with a 32-byte key. It needs no container or configuration.

<?php

require __DIR__ . '/vendor/autoload.php';

use Denosys\Encryption\Encrypter;

// Store the key outside your code, e.g. in APP_KEY.
$key = Encrypter::generateKey();
$encrypter = new Encrypter($key);

$payload = $encrypter->encryptString('card ending 4242');
echo $encrypter->decryptString($payload), "\n";  // card ending 4242

$token = $encrypter->encrypt(['user' => 42]);    // serialises arrays and objects
echo $encrypter->decrypt($token)['user'], "\n";  // 42

Included Modules

  • src/Encryption/*

Development

composer validate --strict find src -type f -name '*.php' -print0 | xargs -0 -n1 php -l