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