Skip to content

Commit aebef2f

Browse files
committed
ed25519: make consts an alias for crypto/ed25519
This is a follow-up to Change-Id: I860ed963a0660753d01c89014c21360b239a38ac (commit 20e1d8d), which dropped compatibility with go1.12, and made this package an alias / wrapper for crypto/ed25519 in stdlib. While the above change aliased types and created wrappers for functions, it left out the consts. I looked at the code review and commit message on that change, but did not find a specific reason to leave these out. This patch updates the consts to be an alias as well, which should make it even more transparent that this package is an alias.
1 parent a1aeb9b commit aebef2f

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ed25519/ed25519.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,21 @@ import (
2323

2424
const (
2525
// PublicKeySize is the size, in bytes, of public keys as used in this package.
26-
PublicKeySize = 32
26+
//
27+
// This const is an alias for [crypto/ed25519.PublicKeySize].
28+
PublicKeySize = ed25519.PublicKeySize
2729
// PrivateKeySize is the size, in bytes, of private keys as used in this package.
28-
PrivateKeySize = 64
30+
//
31+
// This const is an alias for [crypto/ed25519.PrivateKeySize].
32+
PrivateKeySize = ed25519.PrivateKeySize
2933
// SignatureSize is the size, in bytes, of signatures generated and verified by this package.
30-
SignatureSize = 64
34+
//
35+
// This const is an alias for [crypto/ed25519.SignatureSize].
36+
SignatureSize = ed25519.SignatureSize
3137
// SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
32-
SeedSize = 32
38+
//
39+
// This const is an alias for [crypto/ed25519.SeedSize].
40+
SeedSize = ed25519.SeedSize
3341
)
3442

3543
// PublicKey is the type of Ed25519 public keys.

0 commit comments

Comments
 (0)