cryptoutils

package
v0.0.0-...-7a64a06 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BcryptCompare

func BcryptCompare(value []byte, hash []byte) bool

func BcryptHash

func BcryptHash(value []byte) ([]byte, error)

func Decrypt

func Decrypt(value []byte, passPhrase [32]byte) ([]byte, error)

func DecryptAndVerify

func DecryptAndVerify(value []byte, passPhrase [32]byte, hash []byte) ([]byte, error)

func Encrypt

func Encrypt(value []byte, passPhrase [32]byte) ([]byte, error)

func EncryptWithHash

func EncryptWithHash(value []byte, passPhrase [32]byte) ([]byte, []byte, error)

func RandomBytes

func RandomBytes(length int) (res []byte, err error)

func RandomBytesBase64

func RandomBytesBase64(length int) (res string, err error)

func Sha256Compare

func Sha256Compare(value []byte, hash []byte) bool

func Sha256Hash

func Sha256Hash(value []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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