Skip to content

magroski/wt

Repository files navigation

WT

Latest Stable Version Minimum PHP Version CircleCI GitHub license

This library provides a quick and simple way to encode/decode WebTokens.

Usage examples

# Passing the key on the constructor
$wt = new WT('AES-256-CBC', 'abcdefgh', 'potato');

$object = new \stdClass();
$token = $wt->encode($object);

$decoded = $wt->decode($token);

# Passing the key during encode/decode
$wt = new WT('AES-256-CBC', 'xkfo39sp');

$object = new \stdClass();
$token = $wt->encode($object, 'potato');

$decoded = $wt->decode($token, 'potato');

About

WebToken implementation for PHP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages