Examples of DERBitString


Examples of com.maverick.crypto.asn1.DERBitString

    public SubjectPublicKeyInfo(
        AlgorithmIdentifier algId,
        DEREncodable        publicKey)
    {
        this.keyData = new DERBitString(publicKey);
        this.algId = algId;
    }
View Full Code Here

Examples of com.maverick.crypto.asn1.DERBitString

    public SubjectPublicKeyInfo(
        AlgorithmIdentifier algId,
        byte[]              publicKey)
    {
        this.keyData = new DERBitString(publicKey);
        this.algId = algId;
    }
View Full Code Here

Examples of com.maverick.crypto.asn1.DERBitString

        }
    }

    public boolean[] getIssuerUniqueID()
    {
        DERBitString    id = c.getTBSCertificate().getIssuerUniqueId();

        if (id != null)
        {
            byte[]          bytes = id.getBytes();
            boolean[]       boolId = new boolean[bytes.length * 8 - id.getPadBits()];

            for (int i = 0; i != boolId.length; i++)
            {
                boolId[i] = (bytes[i / 8] & (0x80 >>> (i % 8))) != 0;
            }
View Full Code Here

Examples of com.maverick.crypto.asn1.DERBitString

        return null;
    }

    public boolean[] getSubjectUniqueID()
    {
        DERBitString    id = c.getTBSCertificate().getSubjectUniqueId();

        if (id != null)
        {
            byte[]          bytes = id.getBytes();
            boolean[]       boolId = new boolean[bytes.length * 8 - id.getPadBits()];

            for (int i = 0; i != boolId.length; i++)
            {
                boolId[i] = (bytes[i / 8] & (0x80 >>> (i % 8))) != 0;
            }
View Full Code Here

Examples of com.maverick.crypto.asn1.DERBitString

        if (bytes != null)
        {
            try
            {
                DERInputStream  dIn = new DERInputStream(new ByteArrayInputStream(bytes));
                DERBitString    bits = (DERBitString)dIn.readObject();

                bytes = bits.getBytes();
                length = (bytes.length * 8) - bits.getPadBits();
            }
            catch (Exception e)
            {
                throw new RuntimeException("error processing key usage extension");
            }
View Full Code Here

Examples of jcifs.spnego.asn1.DERBitString

                        new DERSequence(vector)));
            }
            int contextFlags = getContextFlags();
            if (contextFlags != 0) {
                fields.add(new DERTaggedObject(true, 1,
                        new DERBitString(contextFlags)));
            }
            byte[] mechanismToken = getMechanismToken();
            if (mechanismToken != null) {
                fields.add(new DERTaggedObject(true, 2,
                        new DEROctetString(mechanismToken)));
View Full Code Here

Examples of jcifs.spnego.asn1.DERBitString

                    mechanisms[i] = mechanism.getId();
                }
                setMechanisms(mechanisms);
                break;
            case 1:
                DERBitString contextFlags = DERBitString.getInstance(tagged,
                        true);
                setContextFlags(contextFlags.getBytes()[0] & 0xff);
                break;
            case 2:
                ASN1OctetString mechanismToken =
                        ASN1OctetString.getInstance(tagged, true);
                setMechanismToken(mechanismToken.getOctets());
View Full Code Here

Examples of org.apache.directory.shared.asn1.der.DERBitString

            DEREncodable derObject = object.getObject();

            switch ( tag )
            {
                case 0:
                    DERBitString tag0 = ( DERBitString ) derObject;
                    modifier.setFlags( new TicketFlags( tag0.getOctets() ) );
                    break;
                   
                case 1:
                    DERSequence tag1 = ( DERSequence ) derObject;
                    modifier.setSessionKey( EncryptionKeyDecoder.decode( tag1 ) );
View Full Code Here

Examples of org.apache.geronimo.crypto.asn1.DERBitString

        // Get SIGN-ALG
        DERSequence signAlg = (DERSequence) spkacSeq.getObjectAt(1);
        DERObject alg0 = (DERObject)signAlg.getObjectAt(0);

        // Get SIGN
        DERBitString sign = (DERBitString) spkacSeq.getObjectAt(2);
        byte[] signature = sign.getBytes();
       
        // Verify the signature on SPKAC
        String signAlgString = PKCSObjectIdentifiers.md5WithRSAEncryption.equals(alg0) ? "MD5withRSA" :
                               PKCSObjectIdentifiers.md2WithRSAEncryption.equals(alg0) ? "MD2withRSA" :
                               PKCSObjectIdentifiers.sha1WithRSAEncryption.equals(alg0) ? "SHA1withRSA" : null;
View Full Code Here

Examples of org.apache.geronimo.crypto.asn1.DERBitString

        // Get SIGN-ALG
        DERSequence signAlg = (DERSequence) spkacSeq.getObjectAt(1);
        DERObject alg0 = (DERObject)signAlg.getObjectAt(0);

        // Get SIGN
        DERBitString sign = (DERBitString) spkacSeq.getObjectAt(2);
        byte[] signature = sign.getBytes();
       
        // Verify the signature on SPKAC
        String signAlgString = PKCSObjectIdentifiers.md5WithRSAEncryption.equals(alg0) ? "MD5withRSA" :
                               PKCSObjectIdentifiers.md2WithRSAEncryption.equals(alg0) ? "MD2withRSA" :
                               PKCSObjectIdentifiers.sha1WithRSAEncryption.equals(alg0) ? "SHA1withRSA" : null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.