Documentation ¶
Index ¶
- func Decrypt(key, text []byte) ([]byte, error)
- func Encrypt(key, text []byte) (string, error)
- func FromPrivKey(privKey ic.PrivKey) (string, error)
- func FromPubKey(pubKey ic.PubKey) (string, error)
- func GenKeyPairs() (ic.PrivKey, ic.PubKey, error)
- func GetPrivKeyFromHexOrBase64(raw string) (ic.PrivKey, error)
- func GetPubKeyFromPeerId(pid string) (ic.PubKey, error)
- func Hex64ToBase64(key string) (string, 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 GetPrivKeyFromHexOrBase64 ¶ added in v0.2.11
GetPrivKeyFromHexOrBase64 can decode a priv key from either hex or base64 format to satisfy different key storage encoding schemes
func Hex64ToBase64 ¶ added in v0.2.11
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.