cryptoexample

package
v0.0.0-...-da378b8 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DesDecrypte

func DesDecrypte()

DesDecrypte example

func DesEncrypte

func DesEncrypte()

DesEncrypte example

func GenRsaKey

func GenRsaKey()

GenRsaKey example

func PKCS7Padding

func PKCS7Padding(cipherText []byte, blockSize int) []byte

PKCS7Padding test 填充到blockSize长度的整数倍, PKCS5Padding固定块大小为8位

func PKCS7UnPadding

func PKCS7UnPadding(paddingText []byte) []byte

PKCS7UnPadding 去掉填充数据

func RsaDecryptWithOAEP

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

RsaDecryptWithOAEP example

func RsaDecryptWithPKCS1v15

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

RsaDecryptWithPKCS1v15 example

func RsaEncryptWithOAEP

func RsaEncryptWithOAEP(msg []byte) ([]byte, error)

RsaEncryptWithOAEP example

func RsaEncryptWithPKCS1v15

func RsaEncryptWithPKCS1v15(msg []byte) ([]byte, error)

RsaEncryptWithPKCS1v15 example

func RsaSignWithPKCS1v15

func RsaSignWithPKCS1v15(msg []byte) ([]byte, error)

RsaSignWithPKCS1v15 example

func RsaVerifyPKCS1v15

func RsaVerifyPKCS1v15(msg []byte, signature []byte) error

RsaVerifyPKCS1v15 example

Types

This section is empty.

Jump to

Keyboard shortcuts

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