crypto

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 14 Imported by: 1

README

crypto

Open in Gitpod

tests

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(input []byte, key string) (bytes []byte, err error)

func AESEncrypt

func AESEncrypt(input []byte, key string) (bytes []byte, err error)

func AESFortifiedDecrypt

func AESFortifiedDecrypt(value string, password string) (string, error)

func AESFortifiedEncrypt

func AESFortifiedEncrypt(value string, password string) (string, error)

func Base64Decode

func Base64Decode(src string) ([]byte, error)

func Base64Encode

func Base64Encode(src []byte) string

func IsBase64

func IsBase64(value string) bool

func PasswordFortify

func PasswordFortify(password string) string

PasswordFortify performs multiple calculations on top of the password and changes it to a derivative long hash. This is done so that even simple and not-long passwords can become longer and stronger (256 characters). If password is longer than 255 it is left intact.

func RequiredBlockLength

func RequiredBlockLength(v int) int

RequiredBlockLength calculates the block length required (128) to contain the provided length

func StrRandom

func StrRandom(length int) string

StrRandom returns a random string of specified length

func StrToMD5Hash

func StrToMD5Hash(text string) string

func StrToSHA1Hash

func StrToSHA1Hash(text string) string

func StrToSHA256Hash

func StrToSHA256Hash(text string) string

func XorDecrypt

func XorDecrypt(encString string, key string) (output string, err error)

XorDecrypt runs a XOR decryption on the input string

func XorEncrypt

func XorEncrypt(input, key string) (output string)

XorEncrypt runs a XOR encryption on the input string

func XorFortifiedDecrypt

func XorFortifiedDecrypt(value string, password string) (string, error)

func XorFortifiedEncrypt

func XorFortifiedEncrypt(value string, password string) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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