crypto

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func CreateAes256GcmAead added in v1.3.0

func CreateAes256GcmAead(key []byte) (cipher.AEAD, error)

func DecryptAes256 added in v1.3.0

func DecryptAes256(ciphertextBytes []byte, aead cipher.AEAD) (string, error)

func EncryptAes256 added in v1.3.0

func EncryptAes256(plaintext string, aead cipher.AEAD) ([]byte, error)

func HashPassword

func HashPassword(password string) (string, error)

func RandString

func RandString(nByte int) (string, error)

func ReadRSAPrivateKey

func ReadRSAPrivateKey(filename string) (*rsa.PrivateKey, error)

func ReadRSAPublicKey

func ReadRSAPublicKey(filename string) (*rsa.PublicKey, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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