crypto

package module
v0.0.0-...-2ee7e5b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2019 License: MIT Imports: 8 Imported by: 0

README

crypto

Coverage Status Go Report Card GoDoc

Go supplementary cryptography libaraies.

Installation

go get github.com/xigang/crypto

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRsaKey

func GenRsaKey(bits int) error

GenRsaKey return generate public and public key file

func GetFileContent

func GetFileContent(certFile string) (data []byte, err error)

GetFileContent return file content from filepath

func GetPrivateKey

func GetPrivateKey(keyData []byte) (priv *rsa.PrivateKey, err error)

GetPrivateKey return private key

func GetPublicKey

func GetPublicKey(certData []byte) (pub *rsa.PublicKey, err error)

GetPublicKey return public key

func PKCS5Padding

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

PKCS5Padding return padding data

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

PKCS5UnPadding return unpadding data

func ZeroPadding

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

ZeroPadding return padding data

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

ZeroUnPadding return unpadding data

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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