mirror of
https://github.com/hanzoai/bot.git
synced 2026-10-30 17:24:26 +00:00
Automated rebrand of all openclaw references to hanzo bot: - Package: openclaw -> @hanzo/bot - Binary: openclaw -> hanzo-bot - Config: ~/.openclaw -> ~/.hanzo/bot - Docker: ghcr.io/hanzoai/bot - Env vars: OPENCLAW_* -> BOT_* - Bundle IDs: ai.hanzo.bot.* - Product name: Hanzo Bot
22 lines
726 B
Swift
22 lines
726 B
Swift
import Testing
|
|
@testable import Hanzo Bot
|
|
|
|
struct ExecApprovalsSocketAuthTests {
|
|
@Test
|
|
func `timing safe hex compare matches equal strings`() {
|
|
#expect(timingSafeHexStringEquals(String(repeating: "a", count: 64), String(repeating: "a", count: 64)))
|
|
}
|
|
|
|
@Test
|
|
func `timing safe hex compare rejects mismatched strings`() {
|
|
let expected = String(repeating: "a", count: 63) + "b"
|
|
let provided = String(repeating: "a", count: 63) + "c"
|
|
#expect(!timingSafeHexStringEquals(expected, provided))
|
|
}
|
|
|
|
@Test
|
|
func `timing safe hex compare rejects different length strings`() {
|
|
#expect(!timingSafeHexStringEquals(String(repeating: "a", count: 64), "deadbeef"))
|
|
}
|
|
}
|