mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-09 16:20:26 +00:00
Length not capacity
This commit is contained in:
parent
9cdfd59476
commit
5477566fa9
@ -55,7 +55,7 @@ func New(secret ed25519.PrivateKey, logger util.Logger, opts ...SetupOption) (*C
|
|||||||
if len(secret) != ed25519.PrivateKeySize {
|
if len(secret) != ed25519.PrivateKeySize {
|
||||||
return nil, fmt.Errorf("private key is incorrect length")
|
return nil, fmt.Errorf("private key is incorrect length")
|
||||||
}
|
}
|
||||||
c.secret = make(ed25519.PrivateKey, 0, ed25519.PrivateKeySize)
|
c.secret = make(ed25519.PrivateKey, ed25519.PrivateKeySize)
|
||||||
copy(c.secret, secret)
|
copy(c.secret, secret)
|
||||||
c.public = secret.Public().(ed25519.PublicKey)
|
c.public = secret.Public().(ed25519.PublicKey)
|
||||||
var err error
|
var err error
|
||||||
|
Loading…
Reference in New Issue
Block a user