Skip to content

Commit

Permalink
ed25519: make consts an alias for crypto/ed25519
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
thaJeztah committed Sep 25, 2023
1 parent a1aeb9b commit aebef2f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions ed25519/ed25519.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,21 @@ import (

const (
// PublicKeySize is the size, in bytes, of public keys as used in this package.
PublicKeySize = 32
//
// This const is an alias for [crypto/ed25519.PublicKeySize].
PublicKeySize = ed25519.PublicKeySize
// PrivateKeySize is the size, in bytes, of private keys as used in this package.
PrivateKeySize = 64
//
// This const is an alias for [crypto/ed25519.PrivateKeySize].
PrivateKeySize = ed25519.PrivateKeySize
// SignatureSize is the size, in bytes, of signatures generated and verified by this package.
SignatureSize = 64
//
// This const is an alias for [crypto/ed25519.SignatureSize].
SignatureSize = ed25519.SignatureSize
// SeedSize is the size, in bytes, of private key seeds. These are the private key representations used by RFC 8032.
SeedSize = 32
//
// This const is an alias for [crypto/ed25519.SeedSize].
SeedSize = ed25519.SeedSize
)

// PublicKey is the type of Ed25519 public keys.
Expand Down

0 comments on commit aebef2f

Please sign in to comment.