Documentation ¶
Index ¶
Constants ¶
View Source
const ( KeyLengthEd25519 = 32 KeyLengthSecp256k1 = 65 KeyLengthGOST = 64 )
View Source
const PrefixUncompressedSecp259k1Key = 0x04
Variables ¶
This section is empty.
Functions ¶
func SignMessageByKeyType ¶
func SignMessageByKeyType(keyType proto.KeyType, keys *Keys, message []byte) ([]byte, []byte, error)
SignMessageByKeyType signs message depending on specified key type
func ValidateKeyLength ¶
Types ¶
type Keys ¶
type Keys struct { KeyType proto.KeyType PublicKeyEd25519 ed25519.PublicKey PrivateKeyEd25519 ed25519.PrivateKey PublicKeySecp256k1 *ecdsa.PublicKey PrivateKeySecp256k1 *ecdsa.PrivateKey PublicKeyGOST *gost3410.PublicKey PrivateKeyGOST *gost3410.PrivateKey PublicKeyBytes []byte PrivateKeyBytes []byte PublicKeyBase58 string }
func GenerateAllKeys ¶
GenerateAllKeys generates all kind of keys
func GenerateEd25519FromBase58 ¶
GenerateEd25519FromBase58 generates ed25519 key from base58 encoded string
func GenerateEd25519FromHex ¶
GenerateEd25519FromHex generates ed25519 key from base58 encoded string
Click to show internal directories.
Click to hide internal directories.