public class RsaKey extends Object
Modifier and Type | Field and Description |
---|---|
static char |
COMMENT_MARK |
static String |
KEY_FORMAT_PKCS1 |
static String |
KEY_FORMAT_PKCS1_PKCS1 |
static String |
KEY_FORMAT_PKCS1_X509 |
static String |
KEY_FORMAT_PKCS8 |
static String |
KEY_FORMAT_PKCS8_X509 |
static String |
KEY_FORMAT_X509 |
static String |
KEY_TYPE_PAIR |
static String |
KEY_TYPE_PRIVATE |
static String |
KEY_TYPE_PUBLIC |
Constructor and Description |
---|
RsaKey(KeyExpression keyExpression) |
RsaKey(String keyExpression) |
Modifier and Type | Method and Description |
---|---|
static String |
extractPrivateKey(KeyExpression keyExpression) |
static String |
extractPublicKey(KeyExpression keyExpression) |
String |
getEncodedRsaPrivateKey() |
String |
getEncodedRsaPublicKey() |
KeyExpression |
getKey(String spec) |
KeyExpression |
getPrivateKey() |
KeyExpression |
getPublicKey() |
static String |
keyFormat(String spec) |
static int |
keySize(String spec) |
static String |
keySpec(String keyFormat,
int keySize,
String keyType) |
static String |
keyType(String spec) |
static RSAPrivateKey |
privateKey(String key,
String keyFormat) |
static RSAPrivateKey |
privateKeyPkcs1(String pkcs1) |
static RSAPrivateKey |
privateKeyPkcs8(String pkcs8) |
static RSAPublicKey |
publicKey(String key,
String keyFormat) |
static RSAPublicKey |
publicKeyX509(String x509) |
String |
toString() |
public static final char COMMENT_MARK
public static final String KEY_FORMAT_PKCS1
public static final String KEY_FORMAT_PKCS8
public static final String KEY_FORMAT_X509
public static final String KEY_FORMAT_PKCS1_PKCS1
public static final String KEY_FORMAT_PKCS1_X509
public static final String KEY_FORMAT_PKCS8_X509
public static final String KEY_TYPE_PAIR
public static final String KEY_TYPE_PRIVATE
public static final String KEY_TYPE_PUBLIC
public RsaKey(KeyExpression keyExpression)
public RsaKey(String keyExpression)
public String getEncodedRsaPrivateKey()
public String getEncodedRsaPublicKey()
public KeyExpression getPrivateKey()
public KeyExpression getPublicKey()
public KeyExpression getKey(String spec)
public static String extractPrivateKey(KeyExpression keyExpression)
public static String extractPublicKey(KeyExpression keyExpression)
public static int keySize(String spec)
public static RSAPrivateKey privateKey(String key, String keyFormat)
public static RSAPublicKey publicKey(String key, String keyFormat)
public static RSAPrivateKey privateKeyPkcs1(String pkcs1)
public static RSAPrivateKey privateKeyPkcs8(String pkcs8)
public static RSAPublicKey publicKeyX509(String x509)
Copyright © 2017. All rights reserved.