org.jboss.resteasy.security
Class DerUtils

java.lang.Object
  extended by org.jboss.resteasy.security.DerUtils

public class DerUtils
extends Object

Extract PrivateKey, PublicKey, and X509Certificate from a DER encoded byte array or file. Usually generated from openssl

Version:
$Revision: 1 $
Author:
Bill Burke

Constructor Summary
DerUtils()
           
 
Method Summary
static X509Certificate decodeCertificate(InputStream is)
           
static PrivateKey decodePrivateKey(byte[] der)
           
static PrivateKey decodePrivateKey(InputStream is)
           
static PublicKey decodePublicKey(byte[] der)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DerUtils

public DerUtils()
Method Detail

decodePrivateKey

public static PrivateKey decodePrivateKey(InputStream is)
                                   throws Exception
Throws:
Exception

decodePublicKey

public static PublicKey decodePublicKey(byte[] der)
                                 throws NoSuchAlgorithmException,
                                        InvalidKeySpecException,
                                        NoSuchProviderException
Throws:
NoSuchAlgorithmException
InvalidKeySpecException
NoSuchProviderException

decodeCertificate

public static X509Certificate decodeCertificate(InputStream is)
                                         throws Exception
Throws:
Exception

decodePrivateKey

public static PrivateKey decodePrivateKey(byte[] der)
                                   throws NoSuchAlgorithmException,
                                          InvalidKeySpecException,
                                          NoSuchProviderException
Throws:
NoSuchAlgorithmException
InvalidKeySpecException
NoSuchProviderException


Copyright © 2012. All Rights Reserved.