diff --git a/NuciText.Obfuscation/INuciText.Obfuscation.cs b/NuciText.Obfuscation/INuciText.Obfuscation.cs index 94e16c9..0e2eb80 100644 --- a/NuciText.Obfuscation/INuciText.Obfuscation.cs +++ b/NuciText.Obfuscation/INuciText.Obfuscation.cs @@ -1,11 +1,30 @@ namespace NuciText.Obfuscation { + /// + /// Defines the interface for the NuciText obfuscator. + /// public interface INuciTextObfuscator { + /// + /// Deobfuscates the specified text. + /// + /// The text to deobfuscate. + /// The deobfuscated text. string Deobfuscate(string text); + /// + /// Obfuscates the specified text. + /// + /// The text to obfuscate. + /// The obfuscated text. string Obfuscate(string text); + /// + /// Obfuscates the specified text using the provided options. + /// + /// The text to obfuscate. + /// The options to use for obfuscation. + /// The obfuscated text. string Obfuscate(string text, NuciTextObfuscatorOptions options); } } diff --git a/NuciText.Obfuscation/NuciText.Obfuscation.cs b/NuciText.Obfuscation/NuciText.Obfuscation.cs index 0992ab8..7d58660 100644 --- a/NuciText.Obfuscation/NuciText.Obfuscation.cs +++ b/NuciText.Obfuscation/NuciText.Obfuscation.cs @@ -175,6 +175,11 @@ public NuciTextObfuscator(string seed) : this(seed.GetHashCode()) { } public NuciTextObfuscator() : this(Environment.TickCount) { } + /// + /// Deobfuscates the specified text. + /// + /// The text to deobfuscate. + /// The deobfuscated text. public string Deobfuscate(string text) { if (text is null) @@ -257,9 +262,20 @@ public string Deobfuscate(string text) return builder.ToString(); } + /// + /// Obfuscates the specified text. + /// + /// The text to obfuscate. + /// The obfuscated text. public string Obfuscate(string text) => Obfuscate(text, new NuciTextObfuscatorOptions()); + /// + /// Obfuscates the specified text using the provided options. + /// + /// The text to obfuscate. + /// The options to use for obfuscation. + /// The obfuscated text. public string Obfuscate(string text, NuciTextObfuscatorOptions options) { if (text is null) diff --git a/NuciText.Obfuscation/NuciTextObfuscatorOptions.cs b/NuciText.Obfuscation/NuciTextObfuscatorOptions.cs index ffbb9f5..97e4144 100644 --- a/NuciText.Obfuscation/NuciTextObfuscatorOptions.cs +++ b/NuciText.Obfuscation/NuciTextObfuscatorOptions.cs @@ -1,7 +1,13 @@ namespace NuciText.Obfuscation { + /// + /// Defines the options for the NuciText obfuscator, allowing customisation of the obfuscation process. + /// public sealed class NuciTextObfuscatorOptions { + /// + /// Gets or sets a value indicating whether to use approximate replacements for characters. + /// public bool UseApproximateReplacements { get; set; } = false; } } diff --git a/README.md b/README.md index 43dd7fa..8af2fca 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Donate](https://img.shields.io/badge/-%E2%99%A5%20Donate-%23ff69b4)](https://hmlendea.go.ro/fund.html) [![Latest GitHub release](https://img.shields.io/github/v/release/hmlendea/nuciapi)](https://github.com/hmlendea/nuciapi/releases/latest) [![Build Status](https://github.com/hmlendea/nucitext.obfuscation/actions/workflows/dotnet.yml/badge.svg)](https://github.com/hmlendea/nucitext.obfuscation/actions/workflows/dotnet.yml) +[![Donate](https://img.shields.io/badge/-%E2%99%A5%20Donate-%23ff69b4)](https://hmlendea.go.ro/fund.html) [![Latest GitHub release](https://img.shields.io/github/v/release/hmlendea/nucitext.obfuscation)](https://github.com/hmlendea/nucitext.obfuscation/releases/latest) [![Build Status](https://github.com/hmlendea/nucitext.obfuscation/actions/workflows/dotnet.yml/badge.svg)](https://github.com/hmlendea/nucitext.obfuscation/actions/workflows/dotnet.yml) # Installation