Documentation ¶
Index ¶
Constants ¶
View Source
const (
SeedLength = 64
)
Some constants
Variables ¶
This section is empty.
Functions ¶
func GenerateSeed ¶
GenerateSeed returns a fresh seed of Seedlength bytes, using crypto/rand as a source
Types ¶
type KeyPair ¶
type KeyPair struct { Seed []byte Feed refs.FeedRef PrivateKey ed25519.PrivateKey }
KeyPair is a bendybutt metafeed keypair and the corresponding feed refrence. It also keeps the seed around for deriving further keys from it.
func DeriveFromSeed ¶
DeriveFromSeed generates a new KeyPair using the seed and label for hkdf derivation
func (KeyPair) MarshalJSON ¶
MarshalJSON turns a keypair into json data adding a `Type: "bendy-butt"` to it
func (KeyPair) Secret ¶
func (kp KeyPair) Secret() ed25519.PrivateKey
Secret returns the private part of the keypair (implements ssb.KeyPair)
func (*KeyPair) UnmarshalJSON ¶
UnmarshalJSON checks if the input data is indeed an object that descripts a bendy-butt keypair
Click to show internal directories.
Click to hide internal directories.