PHPackages                             paper-scorer/decrypter-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. paper-scorer/decrypter-php

ActiveLibrary[Security](/categories/security)

paper-scorer/decrypter-php
==========================

PHP package to encrypt and decrypt PaperScorer callback payloads.

v1.1.0(6mo ago)09MITPHPPHP &gt;=7.4

Since Feb 8Pushed 1mo agoCompare

[ Source](https://github.com/nowtwo-llc/paperscorer-decrypter-php)[ Packagist](https://packagist.org/packages/paper-scorer/decrypter-php)[ RSS](/packages/paper-scorer-decrypter-php/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (5)Used By (0)

paper-scorer/decrypter-php
==========================

[](#paper-scorerdecrypter-php)

PaperScorer Decrypter

This PHP package encrypts and decrypts the payloads exchanged with the PaperScorer engine.

- Package version: 1.2.0

Requirements
------------

[](#requirements)

- PHP 8.0.0 and later
- `openssl` PHP extension

Installation &amp; Usage
------------------------

[](#installation--usage)

### Composer

[](#composer)

This package can be easily installed using the following composer command:

`composer require paper-scorer/decrypter-php`

### Usage

[](#usage)

Include and run the following code in your project:

```
use PaperScorer\DecrypterPhp\Decrypter;

// Create a decrypter with the key provided by PaperScorer.
$decrypter = new Decrypter($decryptKey);

// Decrypt the encrypted callback payload (returns a JSON string).
$decryptedResponse = $decrypter
    ->setEncryptedContent($encryptedContent)
    ->decrypt();

// Produce a payload this library can read back.
$payload = $decrypter->encrypt($decryptedResponse);
```

Encryption scheme
-----------------

[](#encryption-scheme)

- **Cipher:** `AES-128-CBC` (via OpenSSL, with `OPENSSL_RAW_DATA`)
- **Key derivation:** `SHA-256(decryptKey + salt)`, truncated to 16 bytes (AES-128)
- **Payload format:** fixed-width base64 fields, concatenated with no separators:

    FieldRaw bytesBase64 charsPositionIV16240–23Salt212824–51Ciphertextvariablevariable52–endThe offsets depend on these exact byte lengths (a 16-byte IV always encodes to 24 base64 chars; a 21-byte salt to 28). A fresh random IV and salt are generated on every call to `encrypt()`, so the same plaintext yields a different payload each time.

> **Security note:** Key derivation is a single SHA-256 pass with no iteration count (not PBKDF2/scrypt/argon2). This is a deliberate constraint to stay compatible with the existing PaperScorer payload format — it is not suitable as a general-purpose password-based encryption scheme.

Testing
-------

[](#testing)

```
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

We are always looking for updates to the package that will help the community. If you have an idea for an update, please create a pull request with your changes.

Publishing
----------

[](#publishing)

1. Update the CHANGELOG file
2. `git tag -a vX.X.X`
3. `git push --tags origin HEAD:main`
4. Log into [Packagist](https://packagist.org/packages/paper-scorer/decrypter-php) and click "Update"

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance79

Regular maintenance activity

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~177 days

Total

3

Last Release

201d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40868839?v=4)[Robert Velton](/maintainers/rveltonCL)[@rveltonCL](https://github.com/rveltonCL)

---

Top Contributors

[![rveltonCL](https://avatars.githubusercontent.com/u/40868839?v=4)](https://github.com/rveltonCL "rveltonCL (7 commits)")[![RobertVelton](https://avatars.githubusercontent.com/u/3180909?v=4)](https://github.com/RobertVelton "RobertVelton (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/paper-scorer-decrypter-php/health.svg)

```
[![Health](https://phpackages.com/badges/paper-scorer-decrypter-php/health.svg)](https://phpackages.com/packages/paper-scorer-decrypter-php)
```

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
