sergeybrook/php-jws

JSON Web Signature (JWS) library for PHP

v1.0.1 2019-04-08 09:38 UTC

This package is auto-updated.

Last update: 2025-06-21 07:20:22 UTC


README

JSON Web Signature (JWS) library for PHP

There are two signing algorithms implemented:

  • Class JwsMac: For HMAC signature using SHA-256, SHA-384 or SHA-512.
  • Class JwsRsa: For RSASSA-PKCS1-v1_5 signature using SHA-256, SHA-384 or SHA-512.

Installation:

Using Composer:

$ composer require sergeybrook/php-jws

Or:

  • Copy "src" dir to your project (optionally rename it to whatever you want).
  • Require class autoloader (included):
<?php
require_once("<src_dir>/autoload.php");
...

Usage:

See /examples dir.

Specs: