Documentation ¶
Index ¶
- func DecodePrivate(pemEncodedPriv string) (*ecdsa.PrivateKey, error)
- func DecodePublic(pemEncodedPub string) (*ecdsa.PublicKey, error)
- func EncodePrivate(privKey *ecdsa.PrivateKey) (string, error)
- func EncodePublic(pubKey *ecdsa.PublicKey) (string, error)
- func GenerateKeys() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
- func IsNotAllowed(peerId string, wblist model.WhiteOrBlackList) bool
- func LoadConfig(path string) (*model.Config, *model.FixedConfig, error)
- func ReadText(path string) (string, error)
- func Sign(message []byte, privKey *ecdsa.PrivateKey) (string, error)
- func Verify(message []byte, sign string, pubKey *ecdsa.PublicKey) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePrivate ¶
func DecodePrivate(pemEncodedPriv string) (*ecdsa.PrivateKey, error)
DecodePrivate private key
func DecodePublic ¶
DecodePublic public key
func EncodePrivate ¶
func EncodePrivate(privKey *ecdsa.PrivateKey) (string, error)
EncodePrivate private key
func EncodePublic ¶
EncodePublic public key
func GenerateKeys ¶
func GenerateKeys() (*ecdsa.PrivateKey, *ecdsa.PublicKey, error)
GenerateKeys EllipticCurve public and private keys
func IsNotAllowed ¶
func IsNotAllowed(peerId string, wblist model.WhiteOrBlackList) bool
func LoadConfig ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.