salt

package
v0.0.0-...-b0ec76d Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Salt     = env.Get(env.StepinDatabaseSalt, "stepin is salty, like ocean-favor potato chips")
	Password = env.Get(env.StepinDatabasePassword, "123456")
)

Functions

func Decode

func Decode(content, salt []byte) ([]byte, error)

func DecodeFromHexString

func DecodeFromHexString(hexStr HexString, salt []byte) ([]byte, error)

func DecodeFromHexStringToString

func DecodeFromHexStringToString(hexStr HexString, salt []byte) (string, error)

func Encode

func Encode(plain, salt []byte) ([]byte, error)

func Sha256

func Sha256(content []byte) []byte

Types

type HexString

type HexString string

func EncodeToHexString

func EncodeToHexString(plain, salt []byte) (HexString, error)

func Sha256ToHexString

func Sha256ToHexString(content []byte) HexString

func Sha256ToHexStringFromString

func Sha256ToHexStringFromString(content string) HexString

Jump to

Keyboard shortcuts

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