Package sun.security.krb5

Examples of sun.security.krb5.EncryptionKey


        if (destroyed) {
            throw new IOException(Messages.getString("auth.48")); //$NON-NLS-1$
        }
        s.defaultWriteObject();

        byte[] enc = EncryptionKey.ASN1.encode(new EncryptionKey(keyType,
                keyBytes));
        s.writeObject(enc);
    }
View Full Code Here


   private void readObject(ObjectInputStream s) throws IOException,
            ClassNotFoundException {

        s.defaultReadObject();

        EncryptionKey ekey = (EncryptionKey) EncryptionKey.ASN1
                .decode((byte[]) s.readObject());

        keyType = ekey.getType();
        keyBytes = ekey.getValue();
    }
View Full Code Here

   private void readObject(ObjectInputStream s) throws IOException,
            ClassNotFoundException {

        s.defaultReadObject();

        EncryptionKey ekey = (EncryptionKey) EncryptionKey.ASN1
                .decode((byte[]) s.readObject());

        keyType = ekey.getType();
        keyBytes = ekey.getValue();
    }
View Full Code Here

        if (destroyed) {
            throw new IOException(Messages.getString("auth.48")); //$NON-NLS-1$
        }
        s.defaultWriteObject();

        byte[] enc = EncryptionKey.ASN1.encode(new EncryptionKey(keyType,
                keyBytes));
        s.writeObject(enc);
    }
View Full Code Here

   private void readObject(ObjectInputStream s) throws IOException,
            ClassNotFoundException {

        s.defaultReadObject();

        EncryptionKey ekey = (EncryptionKey) EncryptionKey.ASN1
                .decode((byte[]) s.readObject());

        keyType = ekey.getType();
        keyBytes = ekey.getValue();
    }
View Full Code Here

        if (destroyed) {
            throw new IOException(Messages.getString("auth.48")); //$NON-NLS-1$
        }
        s.defaultWriteObject();

        byte[] enc = EncryptionKey.ASN1.encode(new EncryptionKey(keyType,
                keyBytes));
        s.writeObject(enc);
    }
View Full Code Here

        DerValue der;
        DerValue subDer;
        if (((encoding.getTag() & (byte)0x1F) != Krb5.KRB_TKT)
            || (encoding.isApplication() != true)
            || (encoding.isConstructed() != true))
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        der = encoding.getData().getDerValue();
        if (der.getTag() != DerValue.tag_Sequence)
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        subDer = der.getData().getDerValue();
        if ((subDer.getTag() & (byte)0x1F) != (byte)0x00)
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        tkt_vno = subDer.getData().getBigInteger().intValue();
        if (tkt_vno != Krb5.TICKET_VNO)
            throw new KrbApErrException(Krb5.KRB_AP_ERR_BADVERSION);
        realm = Realm.parse(der.getData(), (byte)0x01, false);
        sname = PrincipalName.parse(der.getData(), (byte)0x02, false);
        encPart = EncryptedData.parse(der.getData(), (byte)0x03, false);
        if (der.getData().available() > 0)
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
    }
View Full Code Here

    public static Ticket parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException, RealmException, KrbApErrException {
        if ((optional) && (((byte)data.peekByte() & (byte)0x1F)!= explicitTag))
            return null;
        DerValue der = data.getDerValue();
        if (explicitTag != (der.getTag() & (byte)0x1F))  {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        else {
            DerValue subDer = der.getData().getDerValue();
            return new Ticket(subDer);
        }
View Full Code Here

     */

    public LastReq(DerValue encoding) throws Asn1Exception, IOException {
        Vector<LastReqEntry> v= new Vector<LastReqEntry> ();
        if (encoding.getTag() != DerValue.tag_Sequence) {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        while (encoding.getData().available() > 0) {
            v.addElement(new LastReqEntry(encoding.getData().getDerValue()));
        }
        if (v.size() > 0) {
View Full Code Here

    public static LastReq parse(DerInputStream data, byte explicitTag, boolean optional) throws Asn1Exception, IOException {
        if ((optional) && (((byte)data.peekByte() & (byte)0x1F) != explicitTag))
            return null;
        DerValue der = data.getDerValue();
        if (explicitTag != (der.getTag() & (byte)0x1F))  {
            throw new Asn1Exception(Krb5.ASN1_BAD_ID);
        }
        else {
            DerValue subDer = der.getData().getDerValue();
            return new LastReq(subDer);
        }
View Full Code Here

TOP

Related Classes of sun.security.krb5.EncryptionKey

Copyright © 2018 www.massapicom. 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.