crypto

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(crypted, key []byte, iv []byte, unPaddingFunc func([]byte) (error, []byte)) ([]byte, error)

func AesDecryptPkcs5

func AesDecryptPkcs5(crypted []byte, key []byte, iv []byte) ([]byte, error)

func AesDecryptSimple

func AesDecryptSimple(crypted string, key string, iv string) (string, error)

aes解密

func AesEncrypt

func AesEncrypt(origData []byte, key []byte, iv []byte, paddingFunc func([]byte, int) []byte) ([]byte, error)

func AesEncryptPkcs5

func AesEncryptPkcs5(origData []byte, key []byte, iv []byte) ([]byte, error)

func AesEncryptSimple

func AesEncryptSimple(origData string, key string, iv string) (string, error)

aes加密

func EncodeMD5

func EncodeMD5(value string) string

EncodeMD5 md5 encryption

func EncodeSha256

func EncodeSha256(value string) string

EncodeSha256 sha256 encryption

func EncodeSha384

func EncodeSha384(value string) string

EncodeSha384 sha384 encryption

func EncodeSha512

func EncodeSha512(value string) string

EncodeSha256 sha512 encryption

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) (err error, byte []byte)

func Rc4Decrypt

func Rc4Decrypt(key []byte, crypted []byte) (text []byte)

解密

func Rc4DecryptSimple

func Rc4DecryptSimple(key string, crypted string) (text string)

解密

func Rc4Encrypt

func Rc4Encrypt(key []byte, origData []byte) (text []byte)

RC4加密

func Rc4EncryptSimple

func Rc4EncryptSimple(key string, origData string) (text string)

RC4加密

Types

This section is empty.

Jump to

Keyboard shortcuts

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