onesvm-browser-server/server/internal/gateway/securecompare.go
chii eb972dfa93 feat: 落地 browser-server 控制面并打通 mgr1 海外订阅
单二进制三角色 + Dock 适配器 + Swarm stack 达到可部署态;mgr1 实测订阅经 central-proxy bootstrap,探活 alive=41/52。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 15:05:12 +08:00

8 lines
371 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// securecompare.go:常数时间比对(T3 纪律,gateway 内独立小工具;复用 auth 包
// 语义但不引依赖环——auth 依赖 store,gateway 已依赖 store,为避免实现耦合镜像函数)。
package gateway
import "crypto/hmac"
// hmacEqual hmac.Equal 包装(常数时间)。
func hmacEqual(a, b []byte) bool { return hmac.Equal(a, b) }