Rika .NET DOCS
EN English
TR Türkçe
IT Italiano
DE Deutsch
ES Español

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.

Project Root/
├── Program.cs
└── RikaSDK.cs

VB.NET Projects

Add RikaSDK.vb to your project root.

Project Root/
├── Application.myapp
└── RikaSDK.vb

Enum Enumerations

RenameType

Defines available character sets for renaming.

ValueDescription
JapaneseKanji/Kana characters.
ChineseChinese characters.
TibetianTibetan script characters.
GuidUnique GUIDs (e.g., c234-54...).

RenameMode

Defines the selection mode for renaming. Determines whether all members are renamed by default or only explicitly marked ones.

ValueDescription
AllExceptExcludedRenames everything except explicitly excluded members. This is the default mode.
OnlyIncludedRenames only members explicitly marked with the EnableRenaming attribute. Nothing is renamed by default.

MemberType

Specifies the type of members to target.

Classes Methods Fields Params Events Properties

VirtualizationMode

Defines the complexity level of the VM generation.

ValueDescriptionComplexity
Normal Balanced protection. Recommended for general logic. Medium
Ultra Maximum protection. Slightly higher performance cost. High

ControlFlowMode

Defines the intensity of control flow obfuscation applied to a member or assembly.

ValueDescriptionComplexity
Light Minimal obfuscation with low overhead. Suitable for hot-paths. Low
Standard Balanced control flow flattening. Default mode. Medium
Advanced Aggressive obfuscation with maximum complexity. Higher performance cost. High

Attr Assembly Attributes

RenamingType

Single Instance

Sets the global renaming mode for the entire assembly.

[assembly: RenamingType(RenameType.Japanese)]

RenamingMode

Single Instance

Sets the renaming selection mode for the entire assembly. If not specified, the default mode is AllExceptExcluded.

[assembly: RenamingMode(RenameMode.OnlyIncluded)]

ExcludeMemberFromRenaming

AllowMultiple

Specifies 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.

Performance Warning: Avoid using 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() { ... }

ControlFlowPreset

Default: Standard Assembly · Class · Method

Sets the control flow obfuscation mode at the assembly, class, struct, method, or constructor level. Overrides the global setting for the targeted scope.

[assembly: ControlFlowPreset(ControlFlowMode.Advanced)]

[ControlFlowPreset(ControlFlowMode.Light)]
public class HotPathService {

    [ControlFlowPreset(ControlFlowMode.Advanced)]
    public bool ValidateToken(string token) { ... }
}

EnableRenaming

OnlyIncluded mode only

Opt-in Renaming: Marks a type or member for renaming when using OnlyIncluded mode. This attribute has no effect in AllExceptExcluded mode. When applied to a type, it also enables renaming for all of its members.

This attribute is designed exclusively for OnlyIncluded mode. In AllExceptExcluded mode, all members are already renamed by default, so this attribute is unnecessary.
[assembly: RenamingMode(RenameMode.OnlyIncluded)]

[EnableRenaming]
public class LicenseManager { // Renamed
    public bool Validate() { ... } // Renamed
    public string Key { get; set; } // Renamed
}

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
}

DisableRenamingTypeMembers

Members-Only Exclusion: Prevents renaming of all members within a type (methods, fields, properties, events) while allowing the type name itself to be renamed. In OnlyIncluded mode, a member-level EnableRenaming attribute can override this block for that specific member.

[DisableRenamingTypeMembers]
public class NetworkHandler { // Renamed
    public void Connect() { ... } // Not Renamed
    public string Host { get; set; } // Not Renamed
}