Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM |
static String |
KEY_ID |
static String |
KEY_TYPE |
static String |
KEYS |
static String |
MODULUS |
static String |
PRIVATE_EXPONENT |
static String |
PUBLIC_EXPONENT |
static String |
USE |
Constructor and Description |
---|
JSONWebKeyUtil() |
Modifier and Type | Method and Description |
---|---|
protected static String |
bigIntToString(BigInteger bigInteger) |
static JSONWebKeys |
fromJSON(File file)
Read a set of keys from a file.
|
static JSONWebKeys |
fromJSON(String x)
Take a raw string of text that is the JSON for the keys and convert it into a set of keys.
|
static JSONWebKeys |
makePublic(JSONWebKeys keys)
Very useful utility to take a set of keys and return another set of keys that are only the public parts.
|
static net.sf.json.JSONObject |
toJSON(JSONWebKeys webKeys)
Serialize a set of keys (as a java object) to JSON.
|
public static final String ALGORITHM
public static final String MODULUS
public static final String PUBLIC_EXPONENT
public static final String PRIVATE_EXPONENT
public static final String KEY_ID
public static final String USE
public static final String KEY_TYPE
public static final String KEYS
public static JSONWebKeys fromJSON(File file) throws NoSuchAlgorithmException, InvalidKeySpecException, IOException
file
- NoSuchAlgorithmException
InvalidKeySpecException
IOException
public static JSONWebKeys fromJSON(String x) throws NoSuchAlgorithmException, InvalidKeySpecException
x
- NoSuchAlgorithmException
InvalidKeySpecException
protected static String bigIntToString(BigInteger bigInteger)
public static net.sf.json.JSONObject toJSON(JSONWebKeys webKeys)
webKeys
- public static JSONWebKeys makePublic(JSONWebKeys keys)
keys
- Copyright © 2019. All Rights Reserved.