Maskify.Core
1.0.0
See the version list below for details.
dotnet add package Maskify.Core --version 1.0.0
NuGet\Install-Package Maskify.Core -Version 1.0.0
<PackageReference Include="Maskify.Core" Version="1.0.0" />
<PackageVersion Include="Maskify.Core" Version="1.0.0" />
<PackageReference Include="Maskify.Core" />
paket add Maskify.Core --version 1.0.0
#r "nuget: Maskify.Core, 1.0.0"
#:package Maskify.Core@1.0.0
#addin nuget:?package=Maskify.Core&version=1.0.0
#tool nuget:?package=Maskify.Core&version=1.0.0
Maskify - Sensitive Data Masking Library
A simple, powerful, and efficient way to mask sensitive data.
Maskify is a powerful and easy-to-use library for masking sensitive data such as Brazilian documents (CPF, CNPJ) and emails. It also allows you to mask any other type of information through highly customizable, generic methods.
Features
- CPF Masking: Masks CPF numbers, with or without formatting.
- CNPJ Masking: Supports CNPJ formatting, allowing input with or without mask.
- Email Masking: Partially hides email addresses, preserving domain integrity.
- Generic Masking Method: Allows you to mask any type of sensitive data, such as phone numbers, addresses, and more.
Installation
You can install the package directly from NuGet:
dotnet add package Maskify
Or visit the NuGet package page: Maskify.Core on NuGet
Usage
1. Mask CPF
using Maskify.Core.Libray;
string cpf = "000.000.000-00";
string maskedCpf = Masker.MaskCPF(cpf);
Console.WriteLine(maskedCpf); // Output: ***.***.***-00
2. Mask CNPJ
using Maskify.Core.Libray;
string cnpj = "00.000.000/0000-00";
string maskedCnpj = Masker.MaskCNPJ(cnpj);
Console.WriteLine(maskedCnpj); // Output: **.***.***/****-00
3. Mask Email
using Maskify.Core.Libray;
string email = "user@example.com";
string maskedEmail = Masker.MaskEmail(email);
Console.WriteLine(maskedEmail); // Output: use****@example.com
4. Mask Any Other Data
In addition to specific methods for CPF, CNPJ, and email, you can mask any type of data using the generic method:
using Maskify.Core.Libray;
string sensitiveData = "My confidential info";
string maskedData = Masker.Mask(sensitiveData, 5, 3, '*');
Console.WriteLine(maskedData); // Output: ***** confidential ****
Parameters:
char: Character used for masking (e.g.,*or#).startPosition: Number of characters to keep visible at the start.length: Number of characters to mask after the start position.
Customization
You can customize the mask character, the number of visible digits, and much more. This makes Maskify a flexible solution for your data protection needs.
Contributing
Feel free to contribute to the project by submitting pull requests or issues on our GitHub repository. We welcome contributions that improve performance, add new features, or enhance the documentation.
License
This project is licensed under the terms of the MIT License.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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 is compatible. 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 is compatible. 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. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.