承接 skywalker-labs/constant-time-encoding 相关项目开发

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

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

skywalker-labs/constant-time-encoding

最新稳定版本:v1.0.0

Composer 安装命令:

composer require skywalker-labs/constant-time-encoding

包简介

Constant-time implementations of RFC 4648 encoding (Base64, Base32, Hex) and other variants (Base64UrlSafe, Base64DotSlash, Base32Hex)

README 文档

README

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

Constant-time implementations of RFC 4648 encoding (Base64, Base32, Hex) and other variants.

This library aims to offer character encoding functions that do not leak information about what you are encoding/decoding via processor cache misses.

Features

  • Constant-Time Encoding/Decoding: Prevents cache-timing attacks.
  • Multiple Encodings:
    • Base64 (RFC 4648)
    • Base64UrlSafe (URL-safe variant)
    • Base64DotSlash (Crypt version, ./[A-Z][a-z][0-9])
    • Base64DotSlashOrdered (Ordered variant, [.-9][A-Z][a-z])
    • Base32 (RFC 4648)
    • Base32Hex (RFC 4648 base32hex)
    • Hex (Base16)
  • Security: Uses pack() and unpack() instead of chr() and ord() for safer bit manipulation.
  • Robust: Strict padding validation (optional).

Requirements

  • PHP 7.4 or newer (including PHP 8.x).

Installation

composer require skywalker-labs/constant-time-encoding

Usage

You can use the Skywalker\ConstantTime\Encoding class as a facade for all encoding methods, or use specific classes directly.

Using the Encoding Facade

use Skywalker\ConstantTime\Encoding;

// Sample data
$data = random_bytes(32);

// Base64
echo Encoding::base64Encode($data), "\n";

// Base32 (Uppercase)
echo Encoding::base32EncodeUpper($data), "\n";

// Base32 (Standard)
echo Encoding::base32Encode($data), "\n";

// Hex (Base16)
echo Encoding::hexEncode($data), "\n";
echo Encoding::hexEncodeUpper($data), "\n";

Using Specific Classes

If you only need a specific encoding, you can import the relevant class directly:

use Skywalker\ConstantTime\Base64;
use Skywalker\ConstantTime\Base32;
use Skywalker\ConstantTime\Hex;

$data = random_bytes(32);

// Encode
$b64 = Base64::encode($data);
$b32 = Base32::encode($data);
$hex = Hex::encode($data);

// Decode
$raw = Base64::decode($b64);

Output Example

1VilPkeVqirlPifk5scbzcTTbMT2clp+Zkyv9VFFasE=
2VMKKPSHSWVCVZJ6E7SONRY3ZXCNG3GE6ZZFU7TGJSX7KUKFNLAQ====
2vmkkpshswvcvzj6e7sonry3zxcng3ge6zzfu7tgjsx7kukfnlaq====
d558a53e4795aa2ae53e27e4e6c71bcdc4d36cc4f6725a7e664caff551456ac1
D558A53E4795AA2AE53E27E4E6C71BDCC4D36CC4F6725A7E664CAFF551456AC1

Security

This library was designed to eliminate cache-timing side-channels from encoding operations. It is intended for use in cryptographic contexts where timing leaks could expose sensitive data.

Support

If your company uses this library in their products or services, you may be interested in purchasing a support contract from Skywalker Labs.

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

skywalker-labs/constant-time-encoding 适用场景与选型建议

skywalker-labs/constant-time-encoding 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 02 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「base64」 「base32」 「encoding」 「rfc4648」 「hex」 「base16」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 skywalker-labs/constant-time-encoding 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 skywalker-labs/constant-time-encoding 我们能提供哪些服务?
定制开发 / 二次开发

基于 skywalker-labs/constant-time-encoding 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-15