rsacrypto

package
v0.0.0-...-395e5b3 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package rsacrypto contains utility functions for rsa encryption/decryption

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RsaCrypto

type RsaCrypto struct {
}

func (RsaCrypto) Decrypt

func (crypto RsaCrypto) Decrypt(cipherText string, privateKeyJson string, provider string) (string, error)

func (RsaCrypto) Encrypt

func (crypto RsaCrypto) Encrypt(plainText string, publicKeyJson string) (string, error)

func (RsaCrypto) GenerateKeyPair

func (crypto RsaCrypto) GenerateKeyPair(keySize int) (string, string, error)

func (RsaCrypto) SignData

func (rsaCrypto RsaCrypto) SignData(data string, privateKeyJson string) (string, error)

func (RsaCrypto) VerifySignature

func (rsaCrypto RsaCrypto) VerifySignature(data string, signature string, publicKeyJson string) (bool, error)

type RsaPrivateKey

type RsaPrivateKey rsa.PrivateKey

type RsaPrivateKeyParameters

type RsaPrivateKeyParameters struct {
	D        []byte
	P        []byte
	Q        []byte
	DP       []byte
	DQ       []byte
	InverseQ []byte
	Modulus  []byte
	Exponent []byte
}

type RsaPublicKey

type RsaPublicKey rsa.PublicKey

type RsaPublicKeyParameters

type RsaPublicKeyParameters struct {
	Modulus  []byte
	Exponent []byte
}

Jump to

Keyboard shortcuts

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