crypto

package
v0.27.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(text string, key *[32]byte) (plaintext string, err error)

func AESEncrypt

func AESEncrypt(plaintext string, key *[32]byte) (ciphertext string, err error)

func MD5

func MD5(text string) string

MD5 is just syntax sugar around crypto/md5

func TOTP added in v0.18.0

func TOTP(f func() hash.Hash, digits int, t int, key string) string

Types

type AESSealer

type AESSealer struct{}

func (*AESSealer) Seal

func (*AESSealer) Seal(message, key string) (encoded string, err error)

func (*AESSealer) Unseal

func (*AESSealer) Unseal(message, key string) (decoded string, err error)

Jump to

Keyboard shortcuts

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