encrypt

package
v0.0.0-...-964cb23 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: MulanPSL-2.0 Imports: 10 Imported by: 0

README

encrypt

加解密和哈希算法合集。

  • SHA1
  • HmacSHA1
  • MD5
  • AES/CBC/PKCS5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCbcPkcs5Decrypt

func AesCbcPkcs5Decrypt(cipherData string, keyStr string) (plainText string, err error)

AES/CBC/PKCS5模式解密

func AesCbcPkcs5Encrypt

func AesCbcPkcs5Encrypt(originData string, keyStr string) (encryptText string, err error)

AES/CBC/PKCS5模式加密

func HmacSHA1

func HmacSHA1(plainText string, key string) string

func MD5

func MD5(plainText string) string

func PKCS5Padding

func PKCS5Padding(plainText []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(cipherText []byte) []byte

func SHA1

func SHA1(plainText string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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