cryptology

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(key []byte, ciphertext []byte) ([]byte, error)

AESDecrypt AES 解密

func AESEncrypt

func AESEncrypt(key []byte, plaintext []byte) ([]byte, error)

AESEncrypt AES加密

func GenRsaKey

func GenRsaKey() (prvKey, pubKey []byte, err error)

GenRsaKey 生成 RSA 公钥 私钥文件

func RsaDecrypt

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

RsaDecrypt rsa 公钥解密

func RsaEncrypt

func RsaEncrypt(data, keyBytes []byte) ([]byte, error)

RsaEncrypt RSA 公钥加密

func RsaSignWithSha256

func RsaSignWithSha256(data []byte, keyBytes []byte) ([]byte, error)

RsaSignWithSha256 RAS SHA256 签名

func RsaVerySignWithSha256

func RsaVerySignWithSha256(data, signData, keyBytes []byte) (bool, error)

RsaVerySignWithSha256 RAS SHA256 验签

Types

type Cryptology

type Cryptology byte
const (
	AES Cryptology = iota
	RSA
	ECC
)

Jump to

Keyboard shortcuts

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