Documentation ¶
Index ¶
Constants ¶
View Source
const ( Private = KeyStyle("Private") Public = KeyStyle("Public") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type JsonKeyType ¶
type KeyType ¶
func ToKeyType ¶
func ToKeyType(jsk JsonKeyType) (*KeyType, error)
func (*KeyType) AsJSON ¶
func (k *KeyType) AsJSON() *JsonKeyType
type PrivateKey ¶
type PrivateKey struct {
Key KeyType
}
func MakePrivateKey ¶
func MakePrivateKey(key *RawKey, ids ...string) *PrivateKey
func NewPrivateKey ¶
func NewPrivateKey(pk ...*PrivateKey) (*PrivateKey, error)
NewPrivateKey generates a new curve25519 secret key. It conforms to the format described on https://cr.yp.to/ecdh.html.
func (*PrivateKey) Marshal ¶
func (k *PrivateKey) Marshal() string
MarshalText create a String of the Private Key
func (*PrivateKey) Public ¶
func (k *PrivateKey) Public() *PublicKey
Public computes the public key matching this curve25519 secret key.
Click to show internal directories.
Click to hide internal directories.