encrypt

package
v0.0.0-...-bfc8f05 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecryptCBC

func AesDecryptCBC(encrypted []byte, key []byte) (decrypted []byte)

func AesDecryptCFB

func AesDecryptCFB(encrypted []byte, key []byte) (decrypted []byte)

func AesDecryptECB

func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)

func AesEncryptCBC

func AesEncryptCBC(origData []byte, key []byte) (encrypted []byte, hexStr string, base64Str string)

=================== CBC ======================

func AesEncryptCFB

func AesEncryptCFB(origData []byte, key []byte) (encrypted []byte, hexStr string, base64Str string)

=================== CFB ======================

func AesEncryptECB

func AesEncryptECB(origData []byte, key []byte) (encrypted []byte, hexStr string, base64Str string)

=================== ECB ======================

func GenRsaKey

func GenRsaKey(bits int) (string, string, error)

RSA 生成公私钥对

func MD5

func MD5(encode string) string

func RsaDecrypt

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

RSA 解密

func RsaEncrypt

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

RSA 加密

Types

This section is empty.

Jump to

Keyboard shortcuts

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