rsa

package
v0.0.0-...-ea1d8b2 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2019 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RSACryptoLib

type RSACryptoLib struct {
	// contains filtered or unexported fields
}

RSACryptoLib represents the crypto util.

func NewRSACryptoLib

func NewRSACryptoLib(privateKeyFile string, publicCertFile string) (*RSACryptoLib, error)

NewRSACryptoLib create a new RSACryptoLib, and load private key and certificate from java PKCS12 keystore

func (*RSACryptoLib) Decrypt

func (c *RSACryptoLib) Decrypt(ciphertext []byte) ([]byte, error)

RSA Decrypt

func (*RSACryptoLib) Encrypt

func (c *RSACryptoLib) Encrypt(data []byte) ([]byte, error)

RSA Encrypt

func (*RSACryptoLib) Sign

func (c *RSACryptoLib) Sign(data []byte) ([]byte, error)

func (*RSACryptoLib) Verify

func (c *RSACryptoLib) Verify(data []byte, sig []byte) error

Jump to

Keyboard shortcuts

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