// Copyright 1997 The Open Group Research Institute.  All rights reserved.

package krb5.lib;

import krb5.lib.asn1.*;

/**
 * AS response
 */
public class ASRep extends KDCRep {

	/**
	 * Class constructor
	 *
	 * @param new_pAData is of type PAData[]
	 * @param new_crealm is of type Realm
	 * @param new_cname is of type PrincipalName
	 * @param new_ticket is of type Ticket
	 * @param new_encPart is of type EncryptedData
	 * @see krb5.lib.PAData
	 * @see krb5.lib.Realm
	 * @see krb5.lib.PrincipalName
	 * @see krb5.lib.Ticket
	 * @see krb5.lib.EncryptedData
	 */
	public ASRep(
		PAData[] new_pAData,
		Realm new_crealm,
		PrincipalName new_cname,
		Ticket new_ticket,
		EncryptedData new_encPart
	) {
		super(new_pAData, new_crealm, new_cname, new_ticket,
			new_encPart, Krb5.KRB_AS_REP);
	}

	/**
	 * Class constructor
	 *
	 * @param data is of type byte[]
	 * @exception Asn1Exception an exception
	 * @exception RealmException an exception
	 * @exception KrbApErrException an exception
	 * @see krb5.lib.Asn1Exception
	 * @see krb5.lib.RealmException
	 * @see krb5.lib.KrbApErrException
	 */
	public ASRep(byte[] data) throws Asn1Exception,
		RealmException, KrbApErrException {
		this(new EncodeRef(data));
	}

	/**
	 * Class constructor
	 *
	 * @param ref is of type EncodeRef
	 * @exception Asn1Exception an exception
	 * @exception RealmException an exception
	 * @exception KrbApErrException an exception
	 * @see krb5.lib.asn1.EncodeRef
	 * @see krb5.lib.Asn1Exception
	 * @see krb5.lib.RealmException
	 * @see krb5.lib.KrbApErrException
	 */
	public ASRep(EncodeRef ref) throws Asn1Exception,
		RealmException, KrbApErrException {
		super(ref, Krb5.KRB_AS_REP);
	}

}