encrypt

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

aes crc32 des md5 sha1 等加解密算法

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCFB加密

func AesCFB加密(plainText []byte, key []byte, padding *int, iv ...[]byte) ([]byte, error)

func AesCFB解密

func AesCFB解密(cipherText []byte, key []byte, unPadding int, iv ...[]byte) ([]byte, error)

func Aes加密

func Aes加密(plainText []byte, key []byte, iv ...[]byte) ([]byte, error)

Encrypt is alias of EncryptCBC.

func Aes解密

func Aes解密(cipherText []byte, key []byte, iv ...[]byte) ([]byte, error)

Decrypt is alias of DecryptCBC.

func Crc32加密

func Crc32加密(v interface{}) uint32

func DesECB加密

func DesECB加密(plainText []byte, key []byte, padding int) ([]byte, error)

EncryptECB encrypts <plainText> using ECB mode.

func DesECB解密

func DesECB解密(cipherText []byte, key []byte, padding int) ([]byte, error)

EncryptECB encrypts <plainText> using ECB mode.

func Md5加密

func Md5加密(data interface{}) (encrypt string, err error)

func Md5加密从文件

func Md5加密从文件(path string) (encrypt string, err error)

func Sha1加密

func Sha1加密(v interface{}) string

func Sha1加密从文件

func Sha1加密从文件(path string) (encrypt string, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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