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