-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add public API to enable the obf/deobf of a
Dax.Metadata.Model
obje…
…ct (#16) Introduce a public API to facilitate obfuscation and deobfuscation of a `Dax.Metadata.Model` object, eliminating the need for the VPAX file stream.
- Loading branch information
1 parent
99c237b
commit ce325ac
Showing
2 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,50 @@ | ||
using Dax.Vpax.Obfuscator.Common; | ||
using Dax.Metadata; | ||
using Dax.Vpax.Obfuscator.Common; | ||
|
||
namespace Dax.Vpax.Obfuscator; | ||
|
||
public interface IVpaxObfuscator | ||
{ | ||
/// <summary> | ||
/// Obfuscate the DaxModel.json file and delete all other contents from the provided VPAX stream. | ||
/// Obfuscate the DaxModel.json file and delete all other contents from the <paramref name="stream"/>. | ||
/// </summary> | ||
/// <param name="stream">The VPAX stream</param> | ||
/// <returns>The obfuscation dictionary</returns> | ||
/// <returns>The obfuscation dictionary generated from the obfuscation process</returns> | ||
ObfuscationDictionary Obfuscate(Stream stream); | ||
|
||
/// <summary> | ||
/// Obfuscate the DaxModel.json file and delete all other contents from the provided VPAX stream. | ||
/// Obfuscate the <paramref name="model"/>. | ||
/// </summary> | ||
/// <returns>The obfuscation dictionary generated from the obfuscation process</returns> | ||
ObfuscationDictionary Obfuscate(Model model); | ||
|
||
/// <summary> | ||
/// Incrementally obfuscate the DaxModel.json file and delete all other contents from the <paramref name="stream"/>. | ||
/// </summary> | ||
/// <remarks> | ||
/// This method updates the obfuscation dictionary to changes applied since a previous obfuscation. | ||
/// </remarks> | ||
/// <param name="stream">The VPAX stream</param> | ||
/// <param name="dictionary">The obfuscation dictionary generated from a previous obfuscation</param> | ||
/// <returns>The obfuscation dictionary updated to changes applied since a previous obfuscation.</returns> | ||
/// <returns>The obfuscation <paramref name="dictionary"/> updated to changes applied since a previous obfuscation.</returns> | ||
ObfuscationDictionary Obfuscate(Stream stream, ObfuscationDictionary dictionary); | ||
|
||
/// <summary> | ||
/// Incrementally obfuscate the <paramref name="model"/>. | ||
/// </summary> | ||
/// <param name="stream">The VPAX stream</param> | ||
/// <param name="dictionary">The obfuscation dictionary generated from a previous obfuscation</param> | ||
/// <returns>The obfuscation <paramref name="dictionary"/> updated to changes applied since a previous obfuscation.</returns> | ||
ObfuscationDictionary Obfuscate(Model model, ObfuscationDictionary dictionary); | ||
|
||
/// <summary> | ||
/// Deobfuscate the DaxModel.json file using the provided obfuscation dictionary. | ||
/// </summary> | ||
/// <param name="stream">The VPAX stream</param> | ||
/// <param name="dictionary">The obfuscation dictionary</param> | ||
void Deobfuscate(Stream stream, ObfuscationDictionary dictionary); | ||
|
||
/// <summary> | ||
/// Deobfuscate the <paramref name="model"/> using the provided obfuscation dictionary. | ||
/// </summary> | ||
/// <param name="stream">The VPAX stream</param> | ||
/// <param name="dictionary">The obfuscation dictionary</param> | ||
void Deobfuscate(Model model, ObfuscationDictionary dictionary); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters