Documentation ¶
Index ¶
- type EEngine
- func (e EEngine) DecryptKey(keyJSON []byte, pass string) (*crypto.PrivateKey, *crypto.PublicKey, error)
- func (e EEngine) EncryptKey(priKey *crypto.PrivateKey, pass string) ([]byte, error)
- func (e EEngine) GenKey(params ...interface{}) (*crypto.PrivateKey, *crypto.PublicKey, error)
- func (e EEngine) MappingKey(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) (map[string]interface{}, map[string]interface{}, error)
- func (e EEngine) Marshal(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) ([]byte, []byte, error)
- func (e EEngine) Name() string
- func (e EEngine) Sign(hash []byte, priKey *crypto.PrivateKey) (*crypto.Signature, error)
- func (e EEngine) Unmarshal(privKeyBytes, pubKeyBytes []byte) (privKey *crypto.PrivateKey, pubKey *crypto.PublicKey, err error)
- func (e EEngine) Verify(hash []byte, sig *crypto.Signature) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EEngine ¶
type EEngine struct {
// contains filtered or unexported fields
}
EEngine is the engine of ETH
func (EEngine) DecryptKey ¶
func (e EEngine) DecryptKey(keyJSON []byte, pass string) (*crypto.PrivateKey, *crypto.PublicKey, error)
DecryptKey decrypt private key from file
func (EEngine) EncryptKey ¶
EncryptKey encryptKey into file
func (EEngine) MappingKey ¶
func (e EEngine) MappingKey(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) (map[string]interface{}, map[string]interface{}, error)
MappingKey build private & public key content into map for display or marshal
func (EEngine) Marshal ¶
func (e EEngine) Marshal(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) ([]byte, []byte, error)
Marshal marshal private & public key to json
Click to show internal directories.
Click to hide internal directories.