17c478bd9Sstevel@tonic-gate /*
2159d09a2SMark Phalan  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
37c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
47c478bd9Sstevel@tonic-gate  */
57c478bd9Sstevel@tonic-gate 
67c478bd9Sstevel@tonic-gate 
77c478bd9Sstevel@tonic-gate /*
87c478bd9Sstevel@tonic-gate  * Copyright (C) 1998 by the FundsXpress, INC.
9*55fea89dSDan Cross  *
107c478bd9Sstevel@tonic-gate  * All rights reserved.
11*55fea89dSDan Cross  *
127c478bd9Sstevel@tonic-gate  * Export of this software from the United States of America may require
137c478bd9Sstevel@tonic-gate  * a specific license from the United States Government.  It is the
147c478bd9Sstevel@tonic-gate  * responsibility of any person or organization contemplating export to
157c478bd9Sstevel@tonic-gate  * obtain such a license before exporting.
16*55fea89dSDan Cross  *
177c478bd9Sstevel@tonic-gate  * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
187c478bd9Sstevel@tonic-gate  * distribute this software and its documentation for any purpose and
197c478bd9Sstevel@tonic-gate  * without fee is hereby granted, provided that the above copyright
207c478bd9Sstevel@tonic-gate  * notice appear in all copies and that both that copyright notice and
217c478bd9Sstevel@tonic-gate  * this permission notice appear in supporting documentation, and that
227c478bd9Sstevel@tonic-gate  * the name of FundsXpress. not be used in advertising or publicity pertaining
237c478bd9Sstevel@tonic-gate  * to distribution of the software without specific, written prior
247c478bd9Sstevel@tonic-gate  * permission.  FundsXpress makes no representations about the suitability of
257c478bd9Sstevel@tonic-gate  * this software for any purpose.  It is provided "as is" without express
267c478bd9Sstevel@tonic-gate  * or implied warranty.
27*55fea89dSDan Cross  *
287c478bd9Sstevel@tonic-gate  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
297c478bd9Sstevel@tonic-gate  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
307c478bd9Sstevel@tonic-gate  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
317c478bd9Sstevel@tonic-gate  */
327c478bd9Sstevel@tonic-gate 
33159d09a2SMark Phalan #include "k5-int.h"
34159d09a2SMark Phalan /* Solaris Kerberos */
35159d09a2SMark Phalan #if 0
36159d09a2SMark Phalan #include "rsa-md5.h"
37159d09a2SMark Phalan #endif
38159d09a2SMark Phalan #include "hash_provider.h"
397c478bd9Sstevel@tonic-gate 
407c478bd9Sstevel@tonic-gate static krb5_error_code
k5_md5_hash(krb5_context context,unsigned int icount,krb5_const krb5_data * input,krb5_data * output)417c478bd9Sstevel@tonic-gate k5_md5_hash(krb5_context context,
42159d09a2SMark Phalan 	    unsigned int icount, krb5_const krb5_data *input,
43159d09a2SMark Phalan 	    krb5_data *output)
447c478bd9Sstevel@tonic-gate {
45159d09a2SMark Phalan 	/* Solaris Kerberos */
467c478bd9Sstevel@tonic-gate 	CK_MECHANISM mechanism;
477c478bd9Sstevel@tonic-gate 
487c478bd9Sstevel@tonic-gate 	mechanism.mechanism = CKM_MD5;
497c478bd9Sstevel@tonic-gate 	mechanism.pParameter = NULL_PTR;
507c478bd9Sstevel@tonic-gate 	mechanism.ulParameterLen = 0;
517c478bd9Sstevel@tonic-gate 
527c478bd9Sstevel@tonic-gate 	return(k5_ef_hash(context, &mechanism, icount, input, output));
537c478bd9Sstevel@tonic-gate }
547c478bd9Sstevel@tonic-gate 
55159d09a2SMark Phalan /* Solaris Kerberos */
567c478bd9Sstevel@tonic-gate const struct krb5_hash_provider krb5int_hash_md5 = {
57505d05c7Sgtb     MD5_CKSUM_LENGTH,
58505d05c7Sgtb     MD5_BLOCKSIZE,
597c478bd9Sstevel@tonic-gate     k5_md5_hash
607c478bd9Sstevel@tonic-gate };
61