org.jboss.resteasy.security
Class DerUtils
java.lang.Object
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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DerUtils
public DerUtils()
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.