crypto

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESCBCDecrypt

func AESCBCDecrypt(rawData, key []byte) ([]byte, error)

AESCBCDecrypt aes cbc解密

func AESCBCEncrypt

func AESCBCEncrypt(rawData, key []byte) ([]byte, error)

AESCBCEncrypt aes cbc加密

func Decrypt

func Decrypt(cipherText []byte, privateKey [32]byte) ([]byte, error)

Decrypt 解密

func Encrypt

func Encrypt(plainText []byte, publicKey [32]byte) ([]byte, error)

Encrypt 加密

func GenerateKey

func GenerateKey() (priv, pub [32]byte, err error)

GenerateKey 基于curve25519椭圆曲线算法生成秘钥对(32位)

Types

This section is empty.

Jump to

Keyboard shortcuts

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