Documentation ¶
Overview ¶
Package gmd5 provides useful API for MD5 encryption algorithms.
Index ¶
- func Encrypt(data interface{}) (encrypt string, err error)
- func EncryptBytes(data []byte) (encrypt string, err error)
- func EncryptFile(path string) (encrypt string, err error)
- func EncryptString(data string) (encrypt string, err error)
- func MustEncrypt(data interface{}) string
- func MustEncryptBytes(data []byte) string
- func MustEncryptFile(path string) string
- func MustEncryptString(data string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Encrypt ¶
Encrypt encrypts any type of variable using MD5 algorithms. It uses gconv package to convert <v> to its bytes type.
func EncryptBytes ¶
EncryptBytes encrypts <data> using MD5 algorithms.
func EncryptFile ¶
EncryptFile encrypts file content of <path> using MD5 algorithms.
func EncryptString ¶
EncryptBytes encrypts string <data> using MD5 algorithms.
func MustEncrypt ¶
func MustEncrypt(data interface{}) string
MustEncrypt encrypts any type of variable using MD5 algorithms. It uses gconv package to convert <v> to its bytes type. It panics if any error occurs.
func MustEncryptBytes ¶
MustEncryptBytes encrypts <data> using MD5 algorithms. It panics if any error occurs.
func MustEncryptFile ¶
MustEncryptFile encrypts file content of <path> using MD5 algorithms. It panics if any error occurs.
func MustEncryptString ¶
MustEncryptString encrypts string <data> using MD5 algorithms. It panics if any error occurs.
Types ¶
This section is empty.