17c478bd9Sstevel@tonic-gate /*
2e753f464SWill Fiveash  * Copyright 2010 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 #include "raw.h"
357c478bd9Sstevel@tonic-gate 
367c478bd9Sstevel@tonic-gate /*ARGSUSED*/
377c478bd9Sstevel@tonic-gate krb5_error_code
krb5_raw_decrypt(krb5_context context,const struct krb5_enc_provider * enc,const struct krb5_hash_provider * hash,const krb5_keyblock * key,krb5_keyusage usage,const krb5_data * ivec,const krb5_data * input,krb5_data * output)38159d09a2SMark Phalan krb5_raw_decrypt(krb5_context context,
39159d09a2SMark Phalan 		 const struct krb5_enc_provider *enc,
40159d09a2SMark Phalan 		 const struct krb5_hash_provider *hash,
41159d09a2SMark Phalan 		 const krb5_keyblock *key, krb5_keyusage usage,
42159d09a2SMark Phalan 		 const krb5_data *ivec, const krb5_data *input,
43159d09a2SMark Phalan 		 krb5_data *output)
447c478bd9Sstevel@tonic-gate {
45e753f464SWill Fiveash     if (output->length < input->length)
46e753f464SWill Fiveash         return KRB5_BAD_MSIZE;
47159d09a2SMark Phalan     return((*(enc->decrypt))(context, key, ivec, input, output));
487c478bd9Sstevel@tonic-gate }
49