encrypt

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(cryted string, key string) string

aes 解密

func AesEncrypt

func AesEncrypt(orig string, key string) string

--------- AES加解密 相关 ----------- aes 加密

func Base64Decode

func Base64Decode(src []byte) ([]byte, error)

func Base64Encode

func Base64Encode(src []byte) []byte

func Decrypt

func Decrypt(decrypted string, key []byte) (string, error)

func Encrypt

func Encrypt(text string, key []byte) (string, error)

func Md5Check

func Md5Check(content, encrypted string) bool

------MD5 相关--------

func Md5Encode

func Md5Encode(data string) string

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blocksize int) []byte

补码

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

去码

func RsaDecrypt

func RsaDecrypt(ciphertext []byte) ([]byte, error)

解密

func RsaEncrypt

func RsaEncrypt(origData []byte) ([]byte, error)

加密

func Sha1

func Sha1(s string) string

func ZeroPadding

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

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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