0N/A/*
0N/A * Copyright (C) 1998 by the FundsXpress, INC.
0N/A *
0N/A * All rights reserved.
0N/A *
0N/A * Export of this software from the United States of America may require
0N/A * a specific license from the United States Government. It is the
0N/A * responsibility of any person or organization contemplating export to
0N/A * obtain such a license before exporting.
0N/A *
0N/A * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
0N/A * distribute this software and its documentation for any purpose and
0N/A * without fee is hereby granted, provided that the above copyright
0N/A * notice appear in all copies and that both that copyright notice and
0N/A * this permission notice appear in supporting documentation, and that
0N/A * the name of FundsXpress. not be used in advertising or publicity pertaining
0N/A * to distribution of the software without specific, written prior
0N/A * permission. FundsXpress makes no representations about the suitability of
873N/A * this software for any purpose. It is provided "as is" without express
0N/A * or implied warranty.
0N/A *
0N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
0N/A * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
0N/A * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
3231N/A */
0N/A
0N/A#include <k5-int.h>
0N/A#include <cksumtypes.h>
0N/A
0N/Akrb5_error_code KRB5_CALLCONV
4134N/Akrb5_cksumtype_to_string(krb5_cksumtype cksumtype, char *buffer, size_t buflen)
4134N/A{
4134N/A int i;
4134N/A
0N/A for (i=0; i<krb5int_cksumtypes_length; i++) {
4134N/A if (krb5int_cksumtypes_list[i].ctype == cksumtype) {
4015N/A if ((strlen(krb5int_cksumtypes_list[i].out_string)+1) > buflen)
4134N/A return(ENOMEM);
4134N/A
0N/A /* LINTED */
0N/A strcpy(buffer, krb5int_cksumtypes_list[i].out_string);
4134N/A return(0);
0N/A }
4134N/A }
0N/A
4134N/A return(EINVAL);
4134N/A}
338N/A