All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bouncycastle.x509.extension.X509ExtensionUtil Maven / Gradle / Ivy

Go to download

The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5.

There is a newer version: 1.46
Show newest version
package org.bouncycastle.x509.extension;

import java.io.IOException;

import org.bouncycastle.asn1.ASN1Encodable;
import org.bouncycastle.asn1.ASN1InputStream;
import org.bouncycastle.asn1.ASN1OctetString;


public class X509ExtensionUtil
{
    public static ASN1Encodable fromExtensionValue(
        byte[]  encodedValue) 
        throws IOException
    {
        ASN1InputStream aIn = new ASN1InputStream(encodedValue);
        
        aIn = new ASN1InputStream(((ASN1OctetString)aIn.readObject()).getOctets());
        
        return (ASN1Encodable)aIn.readObject();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy