public class RsaKeyGenerator extends Object implements KeyGenerator
Constructor and Description |
---|
RsaKeyGenerator(String spec) |
Modifier and Type | Method and Description |
---|---|
static KeyExpression |
convertPairFromPkcs8X509ToPkcs1(KeyExpression pairPkcs8X509) |
static String |
convertPrivateKeyFromPkcs8ToPkcs1Pem(byte[] privateKeyPkcs8) |
static String |
convertPublicKeyFromX509ToPkcs1Pem(byte[] publicKeyX509) |
KeyExpression |
generateKey() |
static KeyPair |
generateRsaKeyPair(Provider provider,
int keySize) |
static KeyExpression |
generateRsaKeyPair(Provider provider,
String keyFormat,
int keySize) |
static KeyExpression |
generateRsaKeyPairPkcs8X509(Provider provider,
int keySize) |
KeyExpression |
getKey(String spec) |
static String |
pem(byte[] bytes,
String keyFormat,
String keyType) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSpec
public RsaKeyGenerator(String spec)
public KeyExpression generateKey()
generateKey
in interface KeyGenerator
public KeyExpression getKey(String spec)
getKey
in interface KeyGenerator
public static KeyExpression convertPairFromPkcs8X509ToPkcs1(KeyExpression pairPkcs8X509)
public static String convertPrivateKeyFromPkcs8ToPkcs1Pem(byte[] privateKeyPkcs8)
public static String convertPublicKeyFromX509ToPkcs1Pem(byte[] publicKeyX509)
public static KeyExpression generateRsaKeyPair(Provider provider, String keyFormat, int keySize)
public static KeyExpression generateRsaKeyPairPkcs8X509(Provider provider, int keySize)
Copyright © 2017. All rights reserved.