backend

package
v0.0.0-...-777c140 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// InvalidAddress intends to prevent empty address_to
	InvalidAddress string = "InvalidAddress"
)

Variables

This section is empty.

Functions

func Backend

func Backend(configMap map[string]string) (*backend, error)

Backend returns the backend

func Factory

func Factory(ctx context.Context, conf *logical.BackendConfig) (logical.Backend, error)

Factory returns the backend

func ValidNumber

func ValidNumber(input string) *big.Int

func ZeroKey

func ZeroKey(k *ecdsa.PrivateKey)

Types

type Account

type Account struct {
	Address    string `json:"address"`
	PrivateKey string `json:"private_key"`
	PublicKey  string `json:"public_key"`
}

Account is an Ethereum account

type RsaProvider

type RsaProvider interface {
	GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
	PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
	PublicKeyToBytes(pub *rsa.PublicKey) []byte
	BytesToPrivateKeyPacket(priv []byte) *packet.PrivateKey
	BytesToPublicKeyPacket(pub []byte) *packet.PublicKey
	EncryptWithPublicKey(msg []byte, pubKey []byte) []byte
	DecryptWithPrivateKey(ciphertext []byte, privKey []byte) []byte
}

func NewRsaPgpProvider

func NewRsaPgpProvider() RsaProvider

Jump to

Keyboard shortcuts

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