ShamWow 2.2.0

A document parser that will scrub PII from objects.

Install-Package ShamWow -Version 2.2.0
dotnet add package ShamWow --version 2.2.0
<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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ShamWow, 2.2.0"
For F# scripts that support #r syntax, copy this into the source code 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
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

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

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.2.0 245 6/15/2019
2.1.0 551 12/16/2018
2.0.0 346 12/15/2018