RikaSDK Documentation
Welcome to the official documentation for the Rika .NET Obfuscator SDK.
Using the attributes defined in the RikaSDK namespace,
you can fine-tune the protection process directly from your source code.
Installation
Simply add the provided SDK file to your project solution.
C# Projects
Add RikaSDK.cs to your project root.
├── Program.cs
└── RikaSDK.cs
VB.NET Projects
Add RikaSDK.vb to your project root.
├── Application.myapp
└── RikaSDK.vb
Enum Enumerations
RenameType
Defines available character sets for renaming.
| Value | Description |
|---|---|
| Japanese | Kanji/Kana characters. |
| Chinese | Chinese characters. |
| Tibetian | Tibetan script characters. |
| Guid | Unique GUIDs (e.g., c234-54...). |
MemberType
Specifies the type of members to target.
VirtualizationMode
Defines the complexity level of the VM generation.
| Value | Description | Complexity |
|---|---|---|
| Normal | Balanced protection. Recommended for general logic. | Medium |
| Ultra | Maximum protection. Slightly higher performance cost. | High |
Attr Assembly Attributes
RenamingType
Single InstanceSets the global renaming mode for the entire assembly.
[assembly: RenamingType(RenameType.Japanese)]
ExcludeMemberFromRenaming
AllowMultipleSpecifies member types to be excluded from renaming globally.
[assembly: ExcludeMemberFromRenaming(MemberType.Properties)]
[assembly: ExcludeMemberFromRenaming(MemberType.Events)]
DisableIntegrityProtection
Disables runtime anti-tamper checks. Useful for self-signing or debugging.
[assembly: DisableIntegrityProtection]
Attr Member Attributes
EnableVirtualization
Converts standard MSIL instructions into a proprietary bytecode format interpreted by a custom VM.
VirtualizationMode.Ultra on methods called inside tight loops (e.g., rendering loops or rigorous math calculations). For high-frequency methods, use Normal or exclude them.
[EnableVirtualization(VirtualizationMode.Ultra)]
public bool ValidateLicense(string key) { ... }
DisableStringEncryption
Disables string encryption for the target member. Use on hot-paths for performance.
[DisableStringEncryption]
public void LogDebug(string msg) { ... }
DisableReferenceProxy
Disables proxying for external method calls. By default, Rika hides external calls (e.g., MessageBox.Show) behind internal proxies to prevent static analysis.
[DisableReferenceProxy]
public void CallNativeApi() { ... }
DisableControlFlow
Prevents control flow flattening (spaghetti code). Use this if obfuscation breaks a specific method's logic or causes excessive slowdowns.
[DisableControlFlow]
public int CalculatePhysics() { ... }
DisableRenaming
Complete Exclusion: Prevents renaming of the type itself AND all its members (fields, methods, props). Essential for Serialization, Reflection, or Public APIs.
[DisableRenaming]
public class UserSettings { // Not Renamed
public string Username { get; set; } // Not Renamed
}
DisableRenamingTypeName
Partial Exclusion: Preserves the Class/Struct name but allows renaming of its members. Useful for plugins where the class name is looked up by string, but internal logic should remain hidden.
[DisableRenamingTypeName]
public class MyPluginEntry { // Not Renamed
private void SecretLogic() { ... } // Renamed
}