Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCrypter ¶
func UnRegisterCrypter ¶
func UnRegisterCrypter(name string)
Types ¶
type ICrypter ¶
type ICrypter interface { Name() string GenerateKey() (IPrivateKey, IPublicKey, error) Sign(privateKey IPrivateKey, message []byte) ([]byte, error) Verify(publicKey IPublicKey, message, signature []byte) bool ToPublicKey(data []byte) IPublicKey ToPrivateKey(data []byte) IPrivateKey }
func MustCrypter ¶
type IPrivateKey ¶
type IPrivateKey interface { Public() IPublicKey Bytes() []byte }
IPrivateKey defines the interface of privatekey.
type IPublicKey ¶
type IPublicKey interface {
Bytes() []byte
}
IPublicKey defines the interface of publickey.
Click to show internal directories.
Click to hide internal directories.