Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PublicKeySize is the size, in bytes, of public keys as used in this package. PublicKeySize = 32 // PrivateKeySize is the size, in bytes, of private keys as used in this package. PrivateKeySize = 64 // SignatureSize is the size, in bytes, of signatures generated and verified by this package. SignatureSize = 64 )
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey(rand io.Reader) (publicKey PublicKey, privateKey PrivateKey, err error)
GenerateKey generates a public/private key pair using entropy from rand. If rand is nil, crypto/rand.Reader will be used.
func Sign ¶
func Sign(privateKey PrivateKey, message []byte) []byte
Sign is used to signature the transaction.
Types ¶
type PrivateKey ¶
type PrivateKey ed25519.PrivateKey
PrivateKey is a byte array, []byte.
func (PrivateKey) Public ¶
func (priv PrivateKey) Public() PublicKey
Public returns the public key fo the private key.
Click to show internal directories.
Click to hide internal directories.