10Sstevel@tonic-gate /*
20Sstevel@tonic-gate * Copyright (C) 1998 by the FundsXpress, INC.
30Sstevel@tonic-gate *
40Sstevel@tonic-gate * All rights reserved.
50Sstevel@tonic-gate *
60Sstevel@tonic-gate * Export of this software from the United States of America may require
70Sstevel@tonic-gate * a specific license from the United States Government. It is the
80Sstevel@tonic-gate * responsibility of any person or organization contemplating export to
90Sstevel@tonic-gate * obtain such a license before exporting.
100Sstevel@tonic-gate *
110Sstevel@tonic-gate * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
120Sstevel@tonic-gate * distribute this software and its documentation for any purpose and
130Sstevel@tonic-gate * without fee is hereby granted, provided that the above copyright
140Sstevel@tonic-gate * notice appear in all copies and that both that copyright notice and
150Sstevel@tonic-gate * this permission notice appear in supporting documentation, and that
160Sstevel@tonic-gate * the name of FundsXpress. not be used in advertising or publicity pertaining
170Sstevel@tonic-gate * to distribution of the software without specific, written prior
180Sstevel@tonic-gate * permission. FundsXpress makes no representations about the suitability of
190Sstevel@tonic-gate * this software for any purpose. It is provided "as is" without express
200Sstevel@tonic-gate * or implied warranty.
210Sstevel@tonic-gate *
220Sstevel@tonic-gate * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
230Sstevel@tonic-gate * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
240Sstevel@tonic-gate * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
250Sstevel@tonic-gate */
260Sstevel@tonic-gate
27*7934SMark.Phalan@Sun.COM #include "k5-int.h"
28*7934SMark.Phalan@Sun.COM #include "etypes.h"
290Sstevel@tonic-gate
300Sstevel@tonic-gate /*ARGSUSED*/
31781Sgtb krb5_error_code KRB5_CALLCONV
krb5_c_encrypt_length(krb5_context context,krb5_enctype enctype,size_t inputlen,size_t * length)32781Sgtb krb5_c_encrypt_length(krb5_context context, krb5_enctype enctype,
33*7934SMark.Phalan@Sun.COM size_t inputlen, size_t *length)
340Sstevel@tonic-gate {
350Sstevel@tonic-gate int i;
360Sstevel@tonic-gate
370Sstevel@tonic-gate for (i=0; i<krb5_enctypes_length; i++) {
380Sstevel@tonic-gate if (krb5_enctypes_list[i].etype == enctype)
390Sstevel@tonic-gate break;
400Sstevel@tonic-gate }
410Sstevel@tonic-gate
420Sstevel@tonic-gate if (i == krb5_enctypes_length)
430Sstevel@tonic-gate return(KRB5_BAD_ENCTYPE);
440Sstevel@tonic-gate
450Sstevel@tonic-gate (*(krb5_enctypes_list[i].encrypt_len))
460Sstevel@tonic-gate (krb5_enctypes_list[i].enc, krb5_enctypes_list[i].hash,
470Sstevel@tonic-gate inputlen, length);
480Sstevel@tonic-gate
490Sstevel@tonic-gate return(0);
500Sstevel@tonic-gate }
51