ecc

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ECC256

type ECC256 struct{}

func (*ECC256) Decrypt

func (e *ECC256) Decrypt(ciphertext string, key interface{}) (string, error)

func (*ECC256) Encrypt

func (e *ECC256) Encrypt(plaintext string, key interface{}) (string, error)

type Key

type Key struct {
	Private *ecdsa.PrivateKey
}

func EphermalKey

func EphermalKey() (*Key, error)

func (*Key) MarshalJSON

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

func (*Key) UnmarshalJSON

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

type Keys

type Keys struct {
	KeyMap map[string]*Key `json:"keys"`
}

func GenerateKeys

func GenerateKeys() (Keys, error)

Jump to

Keyboard shortcuts

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