Files
rea/tests/conformance/native/keyed-archive-uid-root.swift
morluto 392f1f3107 refactor: consolidate boundary semantics and prune redundant tests
Share parser modes and collision-free composite keys, enforce architecture guards, and consolidate redundant unit assertions into filesystem, CLI, MCP, and producer-backed workflows. Preserve concurrent upstream boundary fixes and exclude legacy Objective-C class-name bookkeeping labels.

Validation: source/composition suites (3358 passing), focused canonical digest and MCP checks, typecheck/lint, Knip, formatting, architecture guards, and real Foundation archive and Apple legacy simulator CLI/MCP verification. No real Hopper, Ghidra, or IDA verification claim.
2026-10-10 05:56:01 +08:00

9 lines
380 B
Swift

import Foundation
// Encode roots under keys that match both binary and XML UID marker spellings.
let archiver = NSKeyedArchiver(requiringSecureCoding: false)
archiver.encode("payload" as NSString, forKey: "UID")
archiver.encode("payload" as NSString, forKey: "CF$UID")
archiver.finishEncoding()
try archiver.encodedData.write(to: URL(fileURLWithPath: CommandLine.arguments[1]))