asymmetric

package
v0.0.2-alpha Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const RSA_PRIVATE_KEY_NAME = "rsa_private.key"
View Source
const RSA_PUBLIC_KEY_NAME = "rsa_public.key"

Variables

This section is empty.

Functions

This section is empty.

Types

type AsymmetricAlgorithm

type AsymmetricAlgorithm interface {
	CreateKeys()
	ReadKeys()
	Encrypt([]byte) []byte
	Decrypt([]byte) []byte
	Sign([]byte) []byte
	Verify([]byte, []byte) bool
}

type AsymmetricFlags

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

func MakeAsymmetricFlags

func MakeAsymmetricFlags(fg *flag.FlagSet) *AsymmetricFlags

func (*AsymmetricFlags) Do

func (af *AsymmetricFlags) Do() error

func (*AsymmetricFlags) Prepare

func (af *AsymmetricFlags) Prepare()

type RSA

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

func (*RSA) CreateKeys

func (r *RSA) CreateKeys()

func (*RSA) Decrypt

func (r *RSA) Decrypt(input []byte) []byte

func (*RSA) Encrypt

func (r *RSA) Encrypt(input []byte) []byte

func (*RSA) ReadKeys

func (r *RSA) ReadKeys()

func (*RSA) Sign

func (r *RSA) Sign(input []byte) []byte

func (*RSA) Verify

func (r *RSA) Verify(input []byte, signature []byte) bool

Jump to

Keyboard shortcuts

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