|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.resteasy.security.PemUtils
public class PemUtils
Utility classes to extract PublicKey, PrivateKey, and X509Certificate from openssl generated PEM files
Constructor Summary | |
---|---|
PemUtils()
|
Method Summary | |
---|---|
static X509Certificate |
decodeCertificate(InputStream is)
|
static PrivateKey |
decodePrivateKey(InputStream is)
|
static PrivateKey |
decodePrivateKey(String pem)
Extract a private key that is a PKCS8 pem string (base64 encoded PKCS8) |
static PublicKey |
decodePublicKey(String pem)
Extract a public key from a PEM string |
static String |
pemFromStream(InputStream is)
|
static byte[] |
pemToDer(InputStream is)
Decode a PEM file to DER format |
static byte[] |
pemToDer(String pem)
Decode a PEM string to DER format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PemUtils()
Method Detail |
---|
public static X509Certificate decodeCertificate(InputStream is) throws Exception
Exception
public static PublicKey decodePublicKey(String pem) throws Exception
pem
-
Exception
public static PrivateKey decodePrivateKey(String pem) throws Exception
pem
-
Exception
public static PrivateKey decodePrivateKey(InputStream is) throws Exception
Exception
public static byte[] pemToDer(InputStream is) throws IOException
is
-
IOException
public static byte[] pemToDer(String pem) throws IOException
pem
-
IOException
public static String pemFromStream(InputStream is) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |