public class EcJWK extends JWK
Constructor and Description |
---|
EcJWK(KeyUse use,
String alg,
String kid,
String x,
String y,
String curve,
String x5u,
String x5t,
List<String> x5c)
Creates a public EcJWK.
|
EcJWK(KeyUse use,
String alg,
String kid,
String x,
String y,
String d,
String curve,
String x5u,
String x5t,
List<String> x5c)
Creates a public and private EcJWK.
|
Modifier and Type | Method and Description |
---|---|
String |
getCurve()
Gets the known curve to use.
|
String |
getD()
Gets the d value for the elliptical curve private key.
|
String |
getX()
Gets the x value for the elliptical curve point.
|
String |
getY()
Gets the y value for the elliptical curve point.
|
static EcJWK |
parse(JsonValue json)
Parses a JWK from a JsonValue json object.
|
static EcJWK |
parse(String json)
Parses a JWK from a string json object.
|
ECPrivateKey |
toECPrivateKey()
Converts the JWK to a ECPrivateKey.
|
ECPublicKey |
toECPublicKey()
Converts the JWK to a ECPublicKey.
|
String |
toJsonString()
Prints the JWK as a String json object.
|
KeyPair |
toKeyPair()
Converts the JWK to a KeyPair.
|
getAlgorithm, getKeyId, getKeyType, getUse, getX509Chain, getX509Thumbnail, getX509URL, toJsonValue
checkListValuesAreOfType, checkValueIsOfType, get, isDefined, isValueOfType, keys, put, toString
public EcJWK(KeyUse use, String alg, String kid, String x, String y, String d, String curve, String x5u, String x5t, List<String> x5c)
use
- The value of the use JWK parameteralg
- The value of the alg JWK parameterkid
- The key id of the JWKx
- The x value for the elliptical curve pointy
- The y value for the elliptical curve pointd
- The d value for the elliptical curve private keycurve
- The known curve to use. For example "NIST P-256".x5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded stringspublic EcJWK(KeyUse use, String alg, String kid, String x, String y, String curve, String x5u, String x5t, List<String> x5c)
use
- The value of the use JWK parameteralg
- The value of the alg JWK parameterkid
- The key id of the JWKx
- The x value for the elliptical curve pointy
- The y value for the elliptical curve pointcurve
- The known curve to use. For example "NIST P-256".x5u
- the x509 url for the keyx5t
- the x509 thumbnail for the keyx5c
- the x509 chain as a list of Base64 encoded stringspublic String getX()
public String getY()
public String getD()
public String getCurve()
public static EcJWK parse(String json)
json
- string json objectpublic static EcJWK parse(JsonValue json)
json
- JsonValue json objectpublic String toJsonString()
toJsonString
in class JWK
public ECPublicKey toECPublicKey()
public ECPrivateKey toECPrivateKey()
public KeyPair toKeyPair()
Copyright © 2025 Open Identity Platform Community. All rights reserved.