
Security News
PHP Foundation Says Chainguard Broke Security Embargo Ahead of Emergency Patches
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.
dsh-base64-codec
Advanced tools
Base64 codec plugin for DeepSeek Harness: encode/decode base64, base64url, hex, and URL percent-encoding with UTF-8 validation and binary fallback hints, plus JWT decode (no signature verification). Zero runtime dependencies.
DeepSeek Harness 编解码插件:base64 / base64url / hex / url 百分号编码互转,JWT 解码(不验签)。零运行时依赖。
npm install dsh-base64-codec
把 UTF-8 文本编码为四种格式之一:
用户:把 "Hello 世界" 编码成 base64
原文 10 字节 → base64(20 字符):
SGVsbG8g5LiW55WM
参数:text(必填)、encoding(base64 | base64url | hex | url,默认 base64)。结果超过 4000 字符自动截断展示。
把编码文本还原为 UTF-8,自动处理常见脏输入:
- _ 自动映射回 + /,两种字母表互相可解。用户:解码这个:SGVs\nbG8g5LiW55WM
解码结果(10 字节):
Hello 世界
参数:text(必填)、encoding(同上,默认 base64)。
拆解 JWT 三段结构,展示 header/payload 的 JSON,自动把 iat/nbf/exp 时间戳转为 ISO 时间并标注是否过期。
用户:帮我看看这个 token 里存了什么、什么时候过期
⚠ 本工具不校验签名,结果不可用于鉴权决策,仅用于查看内容。
header:{ "alg": "HS256", "typ": "JWT" }
payload:{ "sub": "user-123", "exp": 1779000000, ... }
时间字段:
iat = 1778996400 → 2026-09-18T01:00:00.000Z
exp = 1779000000 → 2026-09-18T02:00:00.000Z(未过期)
signature:sig_nature…(11 字符,未校验)
参数:token(必填,三段式 JWT)。
Hello 世界 为 10 字节:5 ASCII + 2 汉字 × 3 字节)。url 编码按 encodeURIComponent 语义(空格 → %20);解码时 + 视为字面加号而非空格。%4 === 1)与非法字符均拒绝。decode_jwt 不校验签名,也不做 alg 混淆等攻击检测。它只回答「这个 token 里写了什么」,绝不回答「这个 token 是否可信」。鉴权决策必须在服务端用密钥验签后作出。
Q:为什么 base64url 的结果和 base64 有时一样?
只有当编码结果含 + / 或填充 = 时两者才不同;纯字母数字内容(如 Hello 世界 的编码)两者恰好一致。
Q:解码出来是乱码怎么办? 看输出末尾的 ⚠ 提示:若提示「无法按 UTF-8 解析」,说明原文是二进制(图片/压缩包等),本插件只给 hex 兜底,不做二进制预览。
Q:能帮我验证 token 是否有效吗?
只能看 exp 是否过期(会标注)。签名校验涉及密钥,本插件不做也不应做。
MIT
FAQs
DEPRECATED compatibility shell: the codec capability (base64/base64url/hex/url encode & decode, multi-charset decoding with auto sniffing, encoding detection) now lives in dsh-hash-checksum (data toolbox); this package keeps those tools as thin delegates
The npm package dsh-base64-codec receives a total of 0 weekly downloads. As such, dsh-base64-codec popularity was classified as not popular.
We found that dsh-base64-codec demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
The PHP Foundation says Chainguard broke a security embargo ahead of critical RCE patches, as leaks disrupted the coordinated release.

Security News
PHP releases emergency patches for two critical RCE vulnerabilities as agencies urge organizations to take unpatched sites offline.

Threat Research
/Security News
A supply chain attack compromised LiteLLM 1.107.0 on PyPI and Docker, spreading malware that steals cloud credentials, developer secrets, and AI provider keys.