Download the PHP package sopheos/pebble_security without Composer

On this page you can find all versions of the php package sopheos/pebble_security. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pebble_security

Pebble/Security

Security tools from sopheos for PHP 8.1+: JWT (HS, RS, ES*), application tokens, symmetric encryption, bcrypt passwords and hashing helpers.

The library has no Composer dependency. It relies on the openssl and mbstring extensions. Known bugs and debt are listed in TODO.md.

Installation

Claude Code

This package ships a Claude Code skill in skills/pebble-security/. It documents the library's usage patterns and pitfalls: key/algorithm binding in JWT, passing the expected algorithm to JWT::decode(), ES* signature format, Hash and Password deprecated in favor of Crypto, reading legacy ciphertexts, etc.

In a project that depends on sopheos/pebble_security, copy it once into .claude/skills/ after composer install so Claude Code loads it automatically. The folder name must match the name declared in SKILL.md:

To maintain the library itself, see TODO.md.

JWT

\Pebble\Security\JWT only has static methods. Errors throw \Pebble\Security\Exception.

HMAC secrets should be at least as long as the hash output (RFC 7518 §3.2): 32 bytes for HS256, 48 for HS384, 64 for HS512. A shorter secret still works but raises an E_USER_DEPRECATED (once per process) and will be rejected in the next major version. Generate one with Crypto::random(64) (64 hex characters, 32 bytes of entropy).

Algorithms: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512. Names are case-insensitive everywhere (encode(), decode() header and $expectedAlg, sign(), verify()): hs256 is HS256, and encode() always writes the upper-case name in the header. Header parameter and claim names are case-sensitive and read in lower case only: ALG or EXP are ordinary fields, not alg or exp. ES* signatures use the raw R||S format of RFC 7518, like other JWT libraries. During a transition period, verify() also accepts the DER signatures produced by earlier versions.

Token

\Pebble\Security\Token wraps a JWT payload with a uuid and, optionally, a proof (proof) whose sha1 is stored in the hash claim. Errors throw \Pebble\Security\TokenException (token_required or token_invalid).

Crypto

\Pebble\Security\Crypto encrypts with aes-256-gcm (authenticated encryption) and returns base64(iv . tag . ciphertext). The key is derived with sha256.

Static methods (formerly on Hash and Password):

Password

\Pebble\Security\Password is deprecated. Its methods keep their signature and delegate to Crypto:

Hash

\Pebble\Security\Hash is deprecated. Its methods keep their signature and delegate to Crypto: make() → Crypto::hash() (Crypto::make(), deprecated in favor of new Crypto(), builds an instance), salt(), random(), uuid(), otp() and email() → the method of the same name.

Tests

RSA and EC keys are generated on the fly. Known bugs are pinned by tests annotated // BUG: that check the current behavior. Legacy aes-256-cbc ciphertexts are tested against values produced by the previous version.


All versions of pebble_security with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1.0
ext-mbstring Version *
ext-openssl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sopheos/pebble_security contains the following files

Loading the files please wait ...