![JAR search and dependency download from the Maven repository](/logo.png)
org.radarbase.auth.jwks.ECPEMCertificateParser.kt Maven / Gradle / Ivy
package org.radarbase.auth.jwks
import com.auth0.jwt.algorithms.Algorithm
import org.radarbase.auth.jwks.JsonWebKey.Companion.ALGORITHM_EC
import org.radarbase.auth.jwks.PEMCertificateParser.Companion.parsePublicKey
import java.security.interfaces.ECPublicKey
class ECPEMCertificateParser : PEMCertificateParser {
override val jwtAlgorithm: String
get() = "SHA256withECDSA"
override val keyHeader: String
get() = "-----BEGIN EC PUBLIC KEY-----"
override fun parseAlgorithm(publicKey: String): Algorithm = publicKey
.parsePublicKey(keyFactoryType)
.toAlgorithm()
override val keyFactoryType: String
get() = ALGORITHM_EC
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy