Maskify-py

Latest version: v0.1.2

Safety actively analyzes 701507 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 2

1.1.1

New Features:
- **Credit Card Masking**: Supports standard 16-digit, Amex 15-digit, and Diners Club 14-digit card formats.

Improvements:
- Improved handling of CPF and CNPJ inputs, now accepting both formatted and unformatted data.

Bug Fixes:
- Fixed inconsistencies in email masking patterns for various formats.

New Contributors
* ferronicardoso made their first contribution in https://github.com/djesusnet/Maskify.Core/pull/1


**Full Changelog**: https://github.com/djesusnet/Maskify.Core/commits/1.1.1

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:

bash
dotnet add package Maskify


Or visit the NuGet package page: [Maskify.Core on NuGet](https://www.nuget.org/packages/Maskify.Core/1.0.0)

Usage

1. Mask CPF

csharp
using Maskify.Core.Libray;

000.000.00000

string maskedCpf = Masker.MaskCPF(cpf);
Console.WriteLine(maskedCpf); // Output: ***.***.***-00


2. Mask CNPJ

csharp
using Maskify.Core.Libray;


string cnpj = "00.000.000/0000-00";
string maskedCnpj = Masker.MaskCNPJ(cnpj);
Console.WriteLine(maskedCnpj); // Output: **.***.***/****-00


3. Mask Email

csharp
using Maskify.Core.Libray;


string email = "userexample.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:

csharp
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.

Page 2 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.