ShamWow.Interfaces
2.2.0
dotnet add package ShamWow.Interfaces --version 2.2.0
NuGet\Install-Package ShamWow.Interfaces -Version 2.2.0
<PackageReference Include="ShamWow.Interfaces" Version="2.2.0" />
paket add ShamWow.Interfaces --version 2.2.0
#r "nuget: ShamWow.Interfaces, 2.2.0"
// Install ShamWow.Interfaces as a Cake Addin
#addin nuget:?package=ShamWow.Interfaces&version=2.2.0
// Install ShamWow.Interfaces as a Cake Tool
#tool nuget:?package=ShamWow.Interfaces&version=2.2.0
ShamWow Document Scrubber
ShamWow is a document scrubber to remove personally identifiable information while still retaining the same data type(Email, Phone, etc.).
How it Works
ShamWow uses reflection to gain access to all of the properties within a POCO (Plain Old C# Object) and iterates through all the properties while performing scrubbing specific to the type described within the POCO. You describe your type of scrubbing by annotating a property with its specific typed scrubber (ScrubDouble, ScrubInteger, etc.) and then add in the argument corresponding to the type of data you want your PII replaced with.
Example:
//How you would tell ShamWow to scrub an Address
[ScrubString("Address")]
public string StreetAddress1 { get; set; }
In this example ShamWow as long as the value isn't null, then this property will have its value replaced with a fake Address
Full Workflow Example
Once your POCOs are annotated and you have installed the ShamWow NuGet package you're all set you begin scrubbing documents.
Initial Setup
Install needed NuGet packages along with their dependencies
Step 1 Get Requirements
Get object to scrub and get instance of ShamWow
//Fake object
var obj = new object();
//Get instance of ShamWow and run in marked only mode
IShamWow processor = ShamWowEngine.GetFactory().Create(obj, ScrubMode.Marked);
Step 2 Scrubbing
Start scrubbing and get clean values
//Start scrubbing
processor.Scrub();
//Retrieve clean data
var cleanData = processor.CleanData();
Step 3 Verify Scrubbing
Get Manifest and verify the scrubbing was successful
//Get Manifest for Auditing purposes
var manifest = processor.GetManifest();
//Check the manifest for errors
var IsSuccess = processor.CheckManifest();
Special Attributes
PreserveValue ensure the that this property's value will not be scrubbed or changed
StatefulScrub allows you to define a variable name that then can be used throughout your POCO transform to ensure the value's of each decorated property will be the same.
//Example of Preserve attribute
[PreserveValue]
public string str {get; set;}
//Examaple of a stateful scrub
[StatefulScrub("StateOne")]
public int id {get; set;}
Wrap Up
Thats the basics of ShamWow, it is meant to be very painless and require the least amount of intervention by the user. The three major items you need before scrubbing is
- POCOs for data to be mapped to
- ShamWow Engine and Interface NuGet packages
- PII to scrub
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ShamWow.Interfaces:
Package | Downloads |
---|---|
ShamWow
A document parser that will scrub PII from objects. |
GitHub repositories
This package is not used by any popular GitHub repositories.