crypt

package
v0.0.0-...-2e0ef96 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(data []byte, key *rsa.PrivateKey) ([]byte, error)

func Encrypt

func Encrypt(data []byte, pubKey *rsa.PublicKey) ([]byte, error)

func GenKey

func GenKey(bits int) (*rsa.PrivateKey, error)

func GetMaxTextSizeByBits

func GetMaxTextSizeByBits(bits int) (uint, error)

func GetMaxTextSizeByKey

func GetMaxTextSizeByKey(keyIn interface{}) (uint, error)

func RandBytes

func RandBytes(quantity uint) ([]byte, error)

func Sign

func Sign(data []byte, key *rsa.PrivateKey) ([]byte, error)

func Verify

func Verify(data []byte, pubKey *rsa.PublicKey, sign []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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