Documentation ¶
Index ¶
- func Bech32AddressFromPrivateKeyEDD(privateKey []byte) string
- func DecryptPrivateKey(encryptedKey []byte, password string, salt []byte) ([]byte, error)
- func EncryptPrivateKey(privateKey []byte, password string) (cypher []byte, salt []byte, err error)
- func EthMessage(message []byte) []byte
- func GenerateTLSConfig(keyPEM []byte, certPEM []byte) (*tls.Config, error)
- func GetPrivateKeyFromKeyStore(ksPath string, account accounts.Account, password string) ([]byte, error)
- func GetPublicKeyECC(privKey string) string
- func GetPublicKeyEDD(privKey []byte) [32]byte
- func GetPublicKeySECP(privateKey []byte) (string, []byte)
- func GetSignerECC(message *[]byte, signature *string) (string, error)
- func HashMessageEth(message []byte) []byte
- func Keccak256Hash(message []byte) []byte
- func PrivateKeyFromString(privKey string) (*ecdsa.PrivateKey, error)
- func Sha256(s []byte) []byte
- func SignECC(message []byte, privKey string) ([]byte, string)
- func SignEDD(message []byte, privKey []byte) ([]byte, string)
- func SignSECP(message []byte, privateKeyByte []byte) (signatureByte []byte, signatureString string)
- func ToBech32Address(publicKey []byte, prefix string) string
- func ToBtcecSignature(sigHex string) (*[]byte, error)
- func ValidateCert(cert []byte) error
- func VerifySignatureAmino(signedData string, signature []byte, account string, pubKey []byte) (bool, error)
- func VerifySignatureECC(signer string, message *[]byte, signature string) bool
- func VerifySignatureEDD(signer []byte, message *[]byte, signature []byte) (bool, error)
- func VerifySignatureSECP(publicKeyBytes []byte, message []byte, signatureByte []byte) (bool, error)
- type CertData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptPrivateKey ¶ added in v1.2.0
Decrypts the private key using a password and the original salt
func EncryptPrivateKey ¶ added in v1.2.0
Encrypts a private key using a password and scrypt
func EthMessage ¶ added in v1.2.0
func GenerateTLSConfig ¶ added in v1.2.16
func GetPrivateKeyFromKeyStore ¶ added in v1.2.0
func GetPublicKeyECC ¶
func GetPublicKeyEDD ¶
func GetPublicKeySECP ¶
func HashMessageEth ¶ added in v1.2.0
func Keccak256Hash ¶
func PrivateKeyFromString ¶ added in v1.2.0
func PrivateKeyFromString(privKey string) (*ecdsa.PrivateKey, error)
func ToBech32Address ¶
func ToBtcecSignature ¶
30440220 8ee622395fd93884b700406e9f297914b1934d31cece58992897901d6f1930210220296c724c79c5875930fad760f49073b99bf0514d43d2499c0982 8ee622395fd93884b700406e9f297914b1934d31cece58992897901d6f193021296c724c79c5875930fad760f49073b99bf0514d43d2499c0982 6169eb06fe82
func ValidateCert ¶ added in v1.2.16
func VerifySignatureAmino ¶
func VerifySignatureECC ¶
func VerifySignatureEDD ¶
Types ¶
type CertData ¶ added in v1.2.16
func GenerateCertData ¶ added in v1.2.16
Generate a self-signed certificate and save it to files
func GetOrGenerateCert ¶ added in v1.2.16
Click to show internal directories.
Click to hide internal directories.