PHPackages                             clarkeash/php-jwk - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. clarkeash/php-jwk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

clarkeash/php-jwk
=================

A small PHP library to handle JWKs (Json Web Keys)

v2.0.1(today)01↑2900%MITPHPPHP &gt;=8.3CI passing

Since Mar 30Pushed todayCompare

[ Source](https://github.com/clarkeash/php-jwk)[ Packagist](https://packagist.org/packages/clarkeash/php-jwk)[ Docs](https://github.com/clarkeash/php-jwk)[ RSS](/packages/clarkeash-php-jwk/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (10)Used By (0)

php-jwk
=======

[](#php-jwk)

[![Latest Stable Version](https://camo.githubusercontent.com/cbc5cc9c4f638c5d1d5e8f8d52e76cfbc67ea1a9366cd1212fa3f311a5611464/68747470733a2f2f706f7365722e707567782e6f72672f636c61726b656173682f7068702d6a776b2f762f737461626c65)](https://packagist.org/packages/clarkeash/php-jwk)[![coverage](https://raw.githubusercontent.com/clarkeash/php-jwk/gh-pages/.badges/master/coverage.svg)](https://raw.githubusercontent.com/clarkeash/php-jwk/gh-pages/.badges/master/coverage.svg)[![License](https://camo.githubusercontent.com/36fbad66b8624ed8a59fc4a1f53b8b17bc8bc9774defaf7cf56fbd75588f99f1/68747470733a2f2f706f7365722e707567782e6f72672f636c61726b656173682f7068702d6a776b2f6c6963656e7365)](https://packagist.org/packages/clarkeash/php-jwk)

> **Note:** This is a fork of [strobotti/php-jwk](https://github.com/Strobotti/php-jwk), created because the original does not support PHP 8.4. This fork adds support for PHP 8.4 and above.

A small PHP library to handle JWKs (Json Web Keys)

This library helps to create json web key sets from PEM and is also able to pull out PEMs from json web key sets.

Please note that **only RSA keys are supported at the moment!**

See [JSON Web Key RFC](https://tools.ietf.org/html/rfc7517) for reference.

Installation
------------

[](#installation)

This library requires PHP version 8.3 or higher and can be installed with composer:

```
$ composer require clarkeash/php-jwk
```

Example usage
-------------

[](#example-usage)

See full example [here](examples/full-flow.php).

### Create a key-object from PEM

[](#create-a-key-object-from-pem)

```
