ShamWow 2.2.0

dotnet add package ShamWow --version 2.2.0
NuGet\Install-Package ShamWow -Version 2.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShamWow" Version="2.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ShamWow --version 2.2.0
#r "nuget: ShamWow, 2.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ShamWow as a Cake Addin
#addin nuget:?package=ShamWow&version=2.2.0

// Install ShamWow as a Cake Tool
#tool nuget:?package=ShamWow&version=2.2.0

ShamWow Document Scrubber

Build Status CodeFactor

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

  1. ShamWow
  2. ShamWow.Interfaces
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

  1. POCOs for data to be mapped to
  2. ShamWow Engine and Interface NuGet packages
  3. PII to scrub
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.2.0 595 6/15/2019
2.1.0 902 12/16/2018
2.0.0 624 12/15/2018