Documentation ¶
Index ¶
- func ComputeStealthAddress(privateKey *ecdsa.PrivateKey, recipientPublicKey *ecdsa.PublicKey) ecdsa.PublicKey
- func EncodePublic(publicKey *ecdsa.PublicKey) string
- func GenerateAndSaveKeyPair(name, path string) (*ecdsa.PublicKey, *ecdsa.PrivateKey, error)
- func GenerateKeyPair() (*ecdsa.PublicKey, *ecdsa.PrivateKey, error)
- func LoadKeyPair(name, path string) (*ecdsa.PublicKey, *ecdsa.PrivateKey, error)
- func Sign(privateKey *ecdsa.PrivateKey, jsonContent map[string]interface{}) (*big.Int, *big.Int, error)
- func Verify(publicKey ecdsa.PublicKey, jsonContent map[string]interface{}, ...) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeStealthAddress ¶
func ComputeStealthAddress(privateKey *ecdsa.PrivateKey, recipientPublicKey *ecdsa.PublicKey) ecdsa.PublicKey
ComputeStealthAddress returns a public key computed using one private key and one public key it creates a unique combination
func EncodePublic ¶
EncodePublic takes the public key and returns a pem encoded string
func GenerateAndSaveKeyPair ¶
GenerateAndSaveKeyPair generates a pair of public and private keys and save it as files
func GenerateKeyPair ¶
func GenerateKeyPair() (*ecdsa.PublicKey, *ecdsa.PrivateKey, error)
GenerateKeyPair generates a pair of public and private keys of length 256 and returns them
func LoadKeyPair ¶
LoadKeyPair retrives the pair of keys from the given name in their respective path, decodes them and returns them
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.