crypto

package
v0.0.0-...-a102779 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(data, secret string) (str string, err error)

AES Decrypt CBC Mode

func AESEncrypt

func AESEncrypt(data, secret string) (str string, err error)

AES Encrypt CBC Mode

func DecodeHash

func DecodeHash(str, salt string) (int64, error)

func EncodeHash

func EncodeHash(id int64, salt string) (string, error)

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func RSADecrypt

func RSADecrypt(cipher, priKey []byte) ([]byte, error)

RSA Decrypt

func RSADecryptStr

func RSADecryptStr(str, priKey string) (string, error)

RSA Decrypt With Base64

func RSAEncrypt

func RSAEncrypt(data, pubKey []byte) ([]byte, error)

RSA Encrypt

func RSAEncryptStr

func RSAEncryptStr(data, pubKey string) (string, error)

RSA Encrypt With Base64

Types

This section is empty.

Jump to

Keyboard shortcuts

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