Documentation ¶
Index ¶
Constants ¶
View Source
const ( PRIVKEY_SIZE = ed25519.PrivateKeySize PUBKEY_SIZE = ed25519.PublicKeySize SIGNATURE_SIZE = ed25519.SignatureSize )
Variables ¶
This section is empty.
Functions ¶
func GenerateKeypair ¶
func GenerateKeypair() (*PrivateKey, *PublicKey)
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func NewPrivateKey ¶
func NewPrivateKey(data ed25519.PrivateKey) (*PrivateKey, error)
func (*PrivateKey) Public ¶
func (priv *PrivateKey) Public() *PublicKey
func (*PrivateKey) Sign ¶
func (priv *PrivateKey) Sign(message []byte) *Signature
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func (*PublicKey) MarshalJSON ¶
func (*PublicKey) UnmarshalJSON ¶
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func NewSignature ¶
func (*Signature) MarshalJSON ¶
func (*Signature) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.