aboutsummaryrefslogtreecommitdiff
path: root/pub.go
blob: 43b48f0f2741b8acc46f215a0364049cbe202a8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package main

import "golang.org/x/crypto/ed25519"

type PubKey struct {
	PKAlg  [2]byte
	KeyNum [KeyNumLen]byte
	PubKey [ed25519.PublicKeySize]byte
}

func (v *PubKey) Unmarshal(b []byte) error { return DecodeBase64(v, b) }
func (v *PubKey) Marshal() ([]byte, error) { return EncodeBase64(v) }