split the rsa stub package into one file per component

This commit is contained in:
eyedeekay
2025-03-26 19:31:32 -04:00
parent a721856688
commit dcb11d1fda
13 changed files with 98 additions and 66 deletions

View File

@ -1 +1,5 @@
package ecdsa
type (
ECP256PrivateKey [32]byte
)

View File

@ -8,8 +8,7 @@ import (
)
type (
ECP256PublicKey [64]byte
ECP256PrivateKey [32]byte
ECP256PublicKey [64]byte
)
func (k ECP256PublicKey) Len() int {

View File

@ -1 +1,5 @@
package ecdsa
type (
ECP384PrivateKey [48]byte
)

View File

@ -8,8 +8,7 @@ import (
)
type (
ECP384PublicKey [96]byte
ECP384PrivateKey [48]byte
ECP384PublicKey [96]byte
)
func (k ECP384PublicKey) Bytes() []byte {

View File

@ -1 +1,5 @@
package ecdsa
type (
ECP521PrivateKey [66]byte
)

View File

@ -8,8 +8,7 @@ import (
)
type (
ECP521PublicKey [132]byte
ECP521PrivateKey [66]byte
ECP521PublicKey [132]byte
)
func (k ECP521PublicKey) Bytes() []byte {

View File

@ -1,63 +1,5 @@
package rsa
import "github.com/go-i2p/go-i2p/lib/crypto/types"
import "github.com/go-i2p/logger"
type (
RSA2048PublicKey [256]byte
RSA2048PrivateKey [512]byte
)
// Bytes implements SigningPublicKey.
func (r RSA2048PublicKey) Bytes() []byte {
panic("unimplemented")
}
// Len implements SigningPublicKey.
func (r RSA2048PublicKey) Len() int {
panic("unimplemented")
}
// NewVerifier implements SigningPublicKey.
func (r RSA2048PublicKey) NewVerifier() (types.Verifier, error) {
panic("unimplemented")
}
type (
RSA3072PublicKey [384]byte
RSA3072PrivateKey [786]byte
)
// Bytes implements SigningPublicKey.
func (r RSA3072PublicKey) Bytes() []byte {
panic("unimplemented")
}
// Len implements SigningPublicKey.
func (r RSA3072PublicKey) Len() int {
panic("unimplemented")
}
// NewVerifier implements SigningPublicKey.
func (r RSA3072PublicKey) NewVerifier() (types.Verifier, error) {
panic("unimplemented")
}
type (
RSA4096PublicKey [512]byte
RSA4096PrivateKey [1024]byte
)
// Bytes implements SigningPublicKey.
func (r RSA4096PublicKey) Bytes() []byte {
panic("unimplemented")
}
// Len implements SigningPublicKey.
func (r RSA4096PublicKey) Len() int {
panic("unimplemented")
}
// NewVerifier implements SigningPublicKey.
func (r RSA4096PublicKey) NewVerifier() (types.Verifier, error) {
panic("unimplemented")
}
var log = logger.GetGoI2PLogger()

View File

@ -0,0 +1,5 @@
package rsa
type (
RSA2048PrivateKey [512]byte
)

View File

@ -0,0 +1,22 @@
package rsa
import "github.com/go-i2p/go-i2p/lib/crypto/types"
type (
RSA2048PublicKey [256]byte
)
// Bytes implements SigningPublicKey.
func (r RSA2048PublicKey) Bytes() []byte {
panic("unimplemented")
}
// Len implements SigningPublicKey.
func (r RSA2048PublicKey) Len() int {
panic("unimplemented")
}
// NewVerifier implements SigningPublicKey.
func (r RSA2048PublicKey) NewVerifier() (types.Verifier, error) {
panic("unimplemented")
}

View File

@ -0,0 +1,5 @@
package rsa
type (
RSA3072PrivateKey [786]byte
)

View File

@ -0,0 +1,22 @@
package rsa
import "github.com/go-i2p/go-i2p/lib/crypto/types"
type (
RSA3072PublicKey [384]byte
)
// Bytes implements SigningPublicKey.
func (r RSA3072PublicKey) Bytes() []byte {
panic("unimplemented")
}
// Len implements SigningPublicKey.
func (r RSA3072PublicKey) Len() int {
panic("unimplemented")
}
// NewVerifier implements SigningPublicKey.
func (r RSA3072PublicKey) NewVerifier() (types.Verifier, error) {
panic("unimplemented")
}

View File

@ -0,0 +1,5 @@
package rsa
type (
RSA4096PrivateKey [1024]byte
)

View File

@ -0,0 +1,22 @@
package rsa
import "github.com/go-i2p/go-i2p/lib/crypto/types"
type (
RSA4096PublicKey [512]byte
)
// Bytes implements SigningPublicKey.
func (r RSA4096PublicKey) Bytes() []byte {
panic("unimplemented")
}
// Len implements SigningPublicKey.
func (r RSA4096PublicKey) Len() int {
panic("unimplemented")
}
// NewVerifier implements SigningPublicKey.
func (r RSA4096PublicKey) NewVerifier() (types.Verifier, error) {
panic("unimplemented")
}