1 /* Copyright (C) 2000 Aladdin Enterprises. All rights reserved. 2 3 This software is provided AS-IS with no warranty, either express or 4 implied. 5 6 This software is distributed under license and may not be copied, 7 modified or distributed except as expressly authorized under the terms 8 of the license contained in the file LICENSE in this distribution. 9 10 For more information about licensing, please refer to 11 http://www.ghostscript.com/licensing/. For information on 12 commercial licensing, go to http://www.artifex.com/licensing/ or 13 contact Artifex Software, Inc., 101 Lucas Valley Road #110, 14 San Rafael, CA 94903, U.S.A., +1(415)492-9861. 15 */ 16 17 /* $Id: smd5.h,v 1.5 2004/01/13 14:03:30 igor Exp $ */ 18 /* Definitions for MD5Encode filter */ 19 /* Requires scommon.h; strimpl.h if any templates are referenced */ 20 21 #ifndef smd5_INCLUDED 22 # define smd5_INCLUDED 23 24 #include "md5.h" 25 26 /* 27 * The MD5Encode filter accepts an arbitrary amount of input data, and then, 28 * when closed, emits the 16-byte MD5 digest. 29 */ 30 typedef struct stream_MD5E_state_s { 31 stream_state_common; 32 md5_state_t md5; 33 } stream_MD5E_state; 34 35 #define private_st_MD5E_state() /* in smd5.c */\ 36 gs_private_st_simple(st_MD5E_state, stream_MD5E_state,\ 37 "MD5Encode state") 38 extern const stream_template s_MD5E_template; 39 40 stream *s_MD5E_make_stream(gs_memory_t *mem, byte *digest, int digest_size); 41 42 #endif /* smd5_INCLUDED */ 43