承接 soatok/wp-paseto 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

soatok/wp-paseto

最新稳定版本:v0.2.0

Composer 安装命令:

composer require soatok/wp-paseto

包简介

PASETO v4.local implementation that supports PHP 5.6+ (for WordPress projects)

README 文档

README

Build Status Static Analysis Latest Stable Version Latest Unstable Version License Downloads

Requirements:

  • PHP 5.6 or newer

Recommended:

  • PHP 7.2 or newer
  • Sodium extension

Supports key rotation. Implements v4.local. only!

Installing

composer require soatok/wp-paseto

Usage

Provide an array of key id strings mapped to hex-encoded keys to the constructor. Then you can encode() and decode() arrays containing arbitrary claims.

<?php
// Define your keys
$encoder = new WP_Paseto((
    'key-id-1' => 'hex-encoded 256-bit (32 byte) random key goes here',
    'key-id-2' => 'hex-encoded 256-bit (32 byte) random key goes here',
    // ...
    'key-id-N' =>L 'hex-encoded 256-bit (32 byte) random key goes here'
));

// Encode a secret
$token = $encoder->encode(array('secret' => 'value goes here'));

var_dump($token);
/* v4.local.fHvh8jwJauiNMdC0yRZ9xvbCE5cdrNwP4... */

// Decode
$claims = $encoder->decode($token);

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: ISC
  • 更新时间: 2022-10-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固