account

package
v0.0.0-...-fdc5c16 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encrypted

type Encrypted struct {
	Address string
	Data    cipherCommon.EncryptedData
	Config  StoreConfig
}

type SealAccount

type SealAccount struct {
	Address    string
	SingerType string
	Signer     signerCommon.ISigner
}

func NewAccount

func NewAccount(privateKey []byte, sg signers.ISignerGenerator) (sa SealAccount, err error)

func NewAccountForVerify

func NewAccountForVerify(publicKey []byte, sg signers.ISignerGenerator) (sa SealAccount, err error)

func (*SealAccount) FromStore

func (s *SealAccount) FromStore(filename string, password string) (sa SealAccount, err error)

func (SealAccount) Seal

func (s SealAccount) Seal(data []byte, hashCalculator hashes.IHashCalculator) (se seal.Entity, err error)

func (SealAccount) Sign

func (s SealAccount) Sign(data []byte) ([]byte, error)

func (SealAccount) Store

func (s SealAccount) Store(filename string, password string, cipher ciphers.ICipher) (encrypted Encrypted, err error)

func (SealAccount) VerifySeal

func (s SealAccount) VerifySeal(data []byte, sl seal.Entity, hashCalculator hashes.IHashCalculator) (bool, error)

func (SealAccount) VerifySignature

func (s SealAccount) VerifySignature(data []byte, sig []byte) (bool, error)

type StoreConfig

type StoreConfig struct {
	CipherType  string
	CipherParam []byte

	KDFType  string
	KDFSalt  []byte
	KDFParam []byte

	KeyLength int
}

Jump to

Keyboard shortcuts

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