Obfuscation & Tamper Detection
About This Feature
This feature is not AES or equivalent strong encryption. It is a lightweight obfuscation designed to protect Static Game Data from casual inspection and tampering.
For data requiring true security (payment info, authentication credentials, etc.), server-side management is recommended.
Purpose and Scope
Wiener's obfuscation and tamper detection features are designed to protect Static Game Data from casual analysis and tampering.
- Prevents values from being read with a binary editor
- Prevents value exposure through text search
- Detects unauthorized writes to obfuscated fields in memory after loading
Note: Data requiring strong security such as personal information should be managed server-side. Wiener's obfuscation is a lightweight design intended for simple protection of game Static Game Data.
Data Obfuscation
There are two ways to enable obfuscation.
This setting is mainly used for memory tamper detection after loading, and to make direct value inspection more difficult. Obfuscating more fields increases memory usage and adds a small CPU cost on each access. Instead of obfuscating every field by default, enable it only for data that needs tamper detection or protection.
Table-wide: Setting encryption: True in the YAML header obfuscates all fields.
# Table header (obfuscate all fields)
encryption: True
Per-field: Setting encryption: True on an individual field obfuscates only that field.
fields:
- key: DropRate
name: drop_rate
type: UInt
encryption: True # obfuscate this field only
- key: Name
name: name
type: String
# no encryption key → plain text
Supported types: Byte, Short, UShort, Int, UInt, Long, ULong, Float, Double, String
File Tamper Detection
A hash check is performed when loading with LoadBasicPack. If the binary has been modified, an error is returned immediately.
See Mismatch Detection for details.
Memory Tamper Detection
Register a delegate with SetFalsifyDelegate to detect unauthorized writes to obfuscated fields in memory after loading.
WienerManager.SetFalsifyDelegate((fieldName) => {
Debug.LogError($"Memory tamper detected: {fieldName}");
// Send to crash reporting, force quit, etc.
});
Detailed Documentation
- Per-field settings: yaml-fields — encryption
- Header settings: yaml-header — encryption
- C# API: format-csharp