csakey

package
v1.10.17 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2021 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 EncryptedCSAKeyExport added in v1.10.17

type EncryptedCSAKeyExport struct {
	KeyType   string              `json:"keyType"`
	PublicKey string              `json:"publicKey"`
	Crypto    keystore.CryptoJSON `json:"crypto"`
}

type Key

type Key struct {
	ID        uint
	PublicKey crypto.PublicKey

	EncryptedPrivateKey crypto.EncryptedPrivateKey
	CreatedAt           time.Time
	UpdatedAt           time.Time
	// contains filtered or unexported fields
}

func New

func New(passphrase string, scryptParams utils.ScryptParams) (*Key, error)

New creates a new CSA key consisting of an ed25519 key. It encrypts the Key with the passphrase.

func (Key) TableName added in v1.10.17

func (Key) TableName() string

func (Key) ToV2 added in v1.10.17

func (k Key) ToV2() KeyV2

func (*Key) Unlock

func (k *Key) Unlock(password string) error

func (*Key) Unsafe_GetPrivateKey

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

type KeyV2 added in v1.10.17

type KeyV2 struct {
	PublicKey ed25519.PublicKey
	Version   int
	// contains filtered or unexported fields
}

func FromEncryptedJSON added in v1.10.17

func FromEncryptedJSON(keyJSON []byte, password string) (KeyV2, error)

func MustNewV2XXXTestingOnly added in v1.10.17

func MustNewV2XXXTestingOnly(k *big.Int) KeyV2

func NewV2 added in v1.10.17

func NewV2() (KeyV2, error)

func (KeyV2) GoString added in v1.10.17

func (key KeyV2) GoString() string

func (KeyV2) ID added in v1.10.17

func (key KeyV2) ID() string

func (KeyV2) PublicKeyString added in v1.10.17

func (key KeyV2) PublicKeyString() string

func (KeyV2) Raw added in v1.10.17

func (key KeyV2) Raw() Raw

func (KeyV2) String added in v1.10.17

func (key KeyV2) String() string

func (KeyV2) ToEncryptedJSON added in v1.10.17

func (key KeyV2) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error)

type Raw added in v1.10.17

type Raw []byte

func (Raw) GoString added in v1.10.17

func (raw Raw) GoString() string

func (Raw) Key added in v1.10.17

func (raw Raw) Key() KeyV2

func (Raw) String added in v1.10.17

func (raw Raw) String() string

Jump to

Keyboard shortcuts

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