SShortSingh.
Back to feed

Format-Preserving Encryption Tool MaskOps Protects RUT, CPF, DNI Data in Polars

0
·1 views

MaskOps, a Python library, offers format-preserving encryption (FPE) to pseudonymize digit-based personal identifiers such as Chilean RUTs, Brazilian CPFs, and Argentine DNIs within Polars dataframes. Unlike asterisk masking or hashing, FPE transforms an identifier into another valid, same-format value that can be consistently joined across datasets and later decrypted using a client-held key. The library supports two NIST-approved algorithms, FF3-1 and FF1, both built on AES-256 Feistel networks, with FF3-1 set as the default. Critically, MaskOps makes no network calls and stores no data, meaning the encryption key never leaves the client's control, satisfying GDPR Article 4(5) requirements for pseudonymization. However, the tool's documentation emphasizes that FPE output remains personal data under GDPR since it is reversible, and should not be treated as full anonymization.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Good Software Teams Need More Than Clean Code — Process Matters Too

A developer reflects on how structured team workflows, versioning strategies, and documentation are just as critical as well-written code. The author describes discovering that a branching workflow they had long practiced informally was a formally named methodology called Git Flow. They argue that documentation — including READMEs and recorded architecture decisions — is frequently neglected until a new team member joins and struggles to get up to speed. On the process side, the author uses Scrum for deadline-driven projects and Kanban for ongoing maintenance work, depending on team size and scope. The central takeaway is that clean architecture, defined versioning, and a practical agile process together serve the next developer who will inherit the codebase.

0
ProgrammingDEV Community ·

Command Pattern Explained: Encapsulating Requests for Flexible, Decoupled Code

The Command Pattern is a behavioral design pattern that wraps requests as standalone objects, enabling developers to parameterize, queue, log, and undo operations. It involves four key roles: the Command interface, ConcreteCommand implementations, an Invoker that triggers commands, and a Receiver that carries out the actual work. A practical example using TypeScript demonstrates a remote controller toggling a light, with full support for undo functionality via a command history stack. The pattern also scales to advanced use cases such as macro commands, transaction managers, and async task queues. While it promotes clean separation of concerns and open-closed design, it does introduce additional classes and increased complexity in managing command histories.

0
ProgrammingDEV Community ·

How Structured Error Handling Makes AI Coding Agents More Reliable

A technical comparison published on DEV Community contrasts two approaches to building AI agents that automatically fix code, run tests, and commit or roll back changes. The first implementation uses a basic imperative style that lacks timeouts, output validation, and atomic state management, making it prone to silent failures and unreliable rollbacks. The second approach introduces architectural safeguards such as explicit state snapshots, separation of code generation from execution, and structured parsing of language model output before any file is modified. These design patterns, annotated as markers in the code, are intended to prevent system collapse at the boundary between what an AI generates and what the system actually executes. The article argues that without such structural resilience, AI agents risk cascading failures that are difficult to diagnose or recover from.

Format-Preserving Encryption Tool MaskOps Protects RUT, CPF, DNI Data in Polars · ShortSingh