obfuscate

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2023 License: MIT Imports: 1 Imported by: 0

README

obfuscate: Go functions for obfuscating sensitive data

GoDoc Build Status Go Report Card

Features

  • Mask email addresses

Scope

Log personal data like email addresses for debugging purposes.

Limitations

You should not rely on this package for security. Sensitive data should not be stored or stored in a secure way in the first place.

Install

go get github.com/networkteam/obfuscate

Usage

package main

import (
	"fmt"

	"github.com/networkteam/obfuscate"
)

func main() {
	fmt.Println(obfuscate.EmailAddressPartially("john.doe@example.com"))
	// Output:
	// j*n.d*e@e*e.com
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmailAddressPartially

func EmailAddressPartially(emailAddress string) string

EmailAddressPartially obfuscates the email address by masking everything but the first and last character of each part (except TLD). At least some characters of the local part will always be masked.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL