horde/stringprep 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

horde/stringprep

Composer 安装命令:

composer require horde/stringprep

包简介

Internationalized strings preparation library

README 文档

README

Unicode string preparation for authentication and protocol identifiers. Provides both legacy RFC 3454 Stringprep and modern RFC 7564 PRECIS profiles, backed by PHP's ext-intl with no bundled vendor dependencies.

Requires PHP 8.1+ and ext-intl.

Stringprep profiles (RFC 3454)

Frozen to Unicode 3.2. Used by older protocol specifications.

Profile Class RFC Purpose
SASLprep SaslPrepProfile 4013 SASL usernames and passwords
Nameprep NameprepProfile 3491 Internationalized domain names
iSCSI IscsiProfile 3722 iSCSI naming
Nodeprep NodeprepProfile 6122 App A XMPP node identifiers
Resourceprep ResourceprepProfile 6122 App B XMPP resource identifiers
PolicyMIB PolicyMibProfile 4011 Policy-based management
Trace TraceProfile 4505 Anonymous SASL

PRECIS profiles (RFC 7564)

Unicode-version-agile. Recommended for new implementations.

Profile Class RFC Purpose
UsernameCaseMapped UsernameCaseMappedProfile 8265 Usernames (case-insensitive)
UsernameCasePreserved UsernameCasePreservedProfile 8265 Usernames (case-sensitive)
OpaqueString OpaqueStringProfile 8265 Passwords
Nickname NicknameProfile 8266 Chat/display nicknames

Usage

All profiles implement ProfileInterface with the same apply() method:

use Horde\Stringprep\SaslPrepProfile;
use Horde\Stringprep\OpaqueStringProfile;
use Horde\Stringprep\ProfileInterface;

// Legacy stringprep
$saslprep = new SaslPrepProfile();
$username = $saslprep->apply($input, ProfileInterface::MODE_QUERY);

// Modern PRECIS
$opaque = new OpaqueStringProfile();
$password = $opaque->apply($input, ProfileInterface::MODE_STORE);

MODE_STORE (default) rejects unassigned codepoints. MODE_QUERY allows them.

See doc/UPGRADING.md for migration from the bundled lib/ Znerol implementation.

horde/stringprep 适用场景与选型建议

horde/stringprep 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 50 次下载、GitHub Stars 达 1, 最近一次更新时间为 2023 年 12 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 horde/stringprep 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

与 horde/stringprep 相关的其它包

同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 7
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-only
  • 更新时间: 2023-12-22