obfuscate

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeobfuscateBytes

func DeobfuscateBytes(content []byte) []byte

DeobfuscateBytes takes an obfuscated content string and returns the original content string. It performs a deobfuscation process by XORing each byte of the content with a salt value, and then converting the result back to a string.

func DeobfuscateString

func DeobfuscateString(content string) ([]byte, error)

DeobfuscateString takes an obfuscated content string and returns the deobfuscated secret string. It decodes the content string using base32 decoding and then applies the Deobfuscate function to the decoded string. If an error occurs during decoding, the original content string is returned along with the error. Otherwise, the deobfuscated secret string is returned along with a nil error.

func ObfuscateBytes

func ObfuscateBytes(content []byte) []byte

ObfuscateBytes takes a string content and returns an obfuscated version of it. It uses a random salt value to perform bitwise XOR operation on each byte of the content. The obfuscated content is then returned as a string.

func ObfuscateString

func ObfuscateString(content []byte) (string, error)

ObfuscateString takes a string content and obfuscates it by encoding it as base32. It returns the obfuscated string and an error if any.

Types

This section is empty.

Jump to

Keyboard shortcuts

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