Documentation ¶
Index ¶
- type BEngine
- func (e BEngine) DecryptKey(keyJSON []byte, pass string) (*crypto.PrivateKey, *crypto.PublicKey, error)
- func (e BEngine) EncryptKey(priKey *crypto.PrivateKey, pass string) ([]byte, error)
- func (e BEngine) GenKey(params ...interface{}) (*crypto.PrivateKey, *crypto.PublicKey, error)
- func (e BEngine) MappingKey(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) (map[string]interface{}, map[string]interface{}, error)
- func (e BEngine) Marshal(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) (privKeyBytes []byte, pubKeyBytes []byte, err error)
- func (e BEngine) Name() string
- func (e BEngine) Sign(hash []byte, priKey *crypto.PrivateKey) (*crypto.Signature, error)
- func (e BEngine) Unmarshal(privKeyBytes, pubKeyBytes []byte) (privKey *crypto.PrivateKey, pubKey *crypto.PublicKey, err error)
- func (e BEngine) 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 BEngine ¶
type BEngine struct {
// contains filtered or unexported fields
}
BEngine is the engine of BTC
func (BEngine) DecryptKey ¶
func (e BEngine) DecryptKey(keyJSON []byte, pass string) (*crypto.PrivateKey, *crypto.PublicKey, error)
DecryptKey decrypt private key from file
func (BEngine) EncryptKey ¶
EncryptKey encryptKey into file
func (BEngine) MappingKey ¶
func (e BEngine) 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 (BEngine) Marshal ¶
func (e BEngine) Marshal(privKey *crypto.PrivateKey, pubKey *crypto.PublicKey) (privKeyBytes []byte, pubKeyBytes []byte, err error)
Marshal marshal private & public key
Click to show internal directories.
Click to hide internal directories.