xref: /plan9/sys/src/cmd/gs/src/zfmd5.c (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
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: zfmd5.c,v 1.4 2002/02/21 22:24:54 giles Exp $ */
18 /* MD5Encode filter creation */
19 #include "memory_.h"
20 #include "ghost.h"
21 #include "oper.h"
22 #include "gsstruct.h"
23 #include "ialloc.h"
24 #include "stream.h"
25 #include "strimpl.h"
26 #include "smd5.h"
27 #include "ifilter.h"
28 
29 /* <source> MD5Encode/filter <file> */
30 /* <source> <dict> MD5Encode/filter <file> */
31 private int
zMD5E(i_ctx_t * i_ctx_p)32 zMD5E(i_ctx_t *i_ctx_p)
33 {
34     return filter_write_simple(i_ctx_p, &s_MD5E_template);
35 }
36 
37 /* ------ Initialization procedure ------ */
38 
39 const op_def zfmd5_op_defs[] =
40 {
41     op_def_begin_filter(),
42     {"1MD5Encode", zMD5E},
43     op_def_end(0)
44 };
45