Documentation ¶
Index ¶
- func Decrypt(key, text []byte) ([]byte, error)
- func Encrypt(key, text []byte) (string, error)
- func GenKeyPairs() (ic.PrivKey, ic.PubKey, error)
- func GetPubKeyFromPeerId(pid string) (ic.PubKey, error)
- func Pad(src []byte) []byte
- func Sign(key ic.PrivKey, channelMessage proto.Message) ([]byte, error)
- func ToPrivKey(privKey string) (ic.PrivKey, error)
- func ToPrivKeyRaw(privKey []byte) (ic.PrivKey, error)
- func ToPubKey(pubKey string) (ic.PubKey, error)
- func ToPubKeyRaw(pubKey []byte) (ic.PubKey, error)
- func Unpad(src []byte) ([]byte, error)
- func Verify(key ic.PubKey, channelMessage proto.Message, sig []byte) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToPrivKey ¶ added in v0.1.4
private key string to ic.PrivKey interface btfs config stores base64 of private key
func ToPrivKeyRaw ¶ added in v0.1.7
Secp256k1 private key string to ic.PrivKey interface
func ToPubKeyRaw ¶ added in v0.1.7
public key string to ic.PubKey interface
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.