Documentation ¶
Index ¶
- Constants
- func Decode58Check(input string) ([]byte, error)
- func Decrypt(key, text []byte) ([]byte, error)
- func EcdsaSign(ecdsa *ecdsa.PrivateKey, bytes []byte) ([]byte, error)
- func Encode58Check(input []byte) (string, error)
- func Encrypt(key, text []byte) (string, error)
- func FromHex(input string) ([]byte, 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 Hash(s []byte) ([]byte, error)
- func Hex64ToBase64(key string) (string, error)
- func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, 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)
- type Address
- type Keys
Constants ¶
View Source
const ( AddressLength = 21 AddressPrefix = "41" )
Variables ¶
This section is empty.
Functions ¶
func Decode58Check ¶ added in v0.5.5
Decode by base58 and check.
func EcdsaSign ¶ added in v0.5.6
func EcdsaSign(ecdsa *ecdsa.PrivateKey, bytes []byte) ([]byte, error)
func Encode58Check ¶ added in v0.5.5
Encode by base58 and check.
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 HexToECDSA ¶ added in v0.5.6
func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error)
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 ¶
type Address ¶ added in v0.5.5
type Address [AddressLength]byte
func AddressLedgerToTron ¶ added in v0.5.5
Get Tron address from ledger address
func BytesToAddress ¶ added in v0.5.5
func PublicKeyToAddress ¶ added in v0.5.5
ecdsa key to Tron address
Click to show internal directories.
Click to hide internal directories.