rsa

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keys

type Keys struct {
	Private *rsa.PrivateKey
}

func GenerateKeys

func GenerateKeys() (*Keys, error)

func (*Keys) MarshalJSON

func (k *Keys) MarshalJSON() ([]byte, error)

func (*Keys) UnmarshalJSON

func (k *Keys) UnmarshalJSON(data []byte) error

type RSA2048

type RSA2048 struct{}

func (*RSA2048) Decrypt

func (r *RSA2048) Decrypt(ciphertext string, key any) (string, error)

func (*RSA2048) Encrypt

func (r *RSA2048) Encrypt(plaintext string, key any) (string, error)

Jump to

Keyboard shortcuts

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