RedactWire 0.4.0

dotnet add package RedactWire --version 0.4.0
                    
NuGet\Install-Package RedactWire -Version 0.4.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="RedactWire" Version="0.4.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="RedactWire" Version="0.4.0" />
                    
Directory.Packages.props
<PackageReference Include="RedactWire" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add RedactWire --version 0.4.0
                    
#r "nuget: RedactWire, 0.4.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.
#:package RedactWire@0.4.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=RedactWire&version=0.4.0
                    
Install as a Cake Addin
#tool nuget:?package=RedactWire&version=0.4.0
                    
Install as a Cake Tool

RedactWire

Lightweight, culture-aware PII detection, validation and redaction for .NET. Regex-first and checksum-validated — a random 16-digit number isn't reported as a credit card, and a national ID with a bad check digit is dropped, not guessed.

  • Targets netstandard2.0 (works on .NET Framework 4.6.1+, .NET Core/5–8+, Mono, Unity).
  • Built-in packs for 50+ countries (national IDs, tax numbers, phones, passports, postcodes), most gated by the real check-digit algorithm.
  • Secret detection — API keys & tokens (OpenAI, AWS, GitHub, Stripe, Slack, Google, SendGrid, npm), JWT, PEM private keys — via AddSecretDetection(). Great for AI/LLM logs.
  • Severity-driven overlap resolution; redaction (mask / remove / label / custom).
  • Structured scanning of JSON / XML / objects is an opt-in add-on — RedactWire.Structured — so this core package carries no System.Text.Json dependency.

Quick start

using RedactWire;

// Zero-config static facade
PiiResult r   = Redactor.Detect("My SSN is 123-45-6789");
bool      hit = Redactor.HasPii("Call (415) 555-0132");
string    safe = Redactor.Redact("Card 4242 4242 4242 4242");

// Validate a single value
Redactor.Validate("123-45-6789", PiiType.SocialSecurity);   // Valid / Invalid / Unsupported

// Pick cultures via the builder
var detector = PiiDetectorBuilder.CreateDefault()
    .AddCulture(new CultureInfo("en-GB"))
    .Build();
// ASP.NET Core / DI
builder.Services.AddRedactWire(b => b.AddCulture(new CultureInfo("de-DE")));

Packs resolve by country: a country's languages share one pack (en-IN/hi-IN, en-CA/fr-CA), while the same language across countries stays distinct (zh-CN/zh-TW/zh-HK/zh-SG).

Patterns/checksums are knowledge-based and being verified against authoritative sources — treat unverified packs as best-effort until confirmed.

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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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 (2)

Showing the top 2 NuGet packages that depend on RedactWire:

Package Downloads
BotWire.Core

Core engine for BotWire — a low-cost, self-hosted AI customer-support bot for .NET. RAG answers grounded in your own docs, automatic escalation to human tickets, PII + prompt-injection guards. No ASP.NET dependency. Commercial licenses available for proprietary use.

RedactWire.Structured

Structured PII scanning add-on for RedactWire — detect PII inside JSON, XML and object graphs, each hit located by JSONPath / XPath / property path. Adds a System.Text.Json dependency; install only if you need structured scanning (the core RedactWire package stays free of it).

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.4.0 398 6/26/2026
0.3.0 101 6/24/2026
0.1.0 102 6/23/2026

0.4.0 — BREAKING: structured scanning (JSON/XML/object) moved to the new RedactWire.Structured package; core no longer depends on System.Text.Json. Redactor.DetectJson/DetectXml/DetectObject removed — reference RedactWire.Structured and call Redactor.Default.DetectJson(...) or detector.DetectJson(...). Added: secret detection (AddSecretDetection), remove/replace built-in rules, region-based culture resolution. See CHANGELOG.md.