sig-auth/server/validation.go

18 lines
259 B
Go
Raw Normal View History

2025-02-20 23:00:04 -05:00
package server
import (
"crypto"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/rsa"
)
func isValidKeyType(key crypto.PublicKey) bool {
switch key.(type) {
case ed25519.PublicKey, *rsa.PublicKey, *ecdsa.PublicKey:
return true
default:
return false
}
}