Back to index

texmacs  1.0.7.15
dpxcrypt.h
Go to the documentation of this file.
00001 /*  $Header: /home/cvsroot/dvipdfmx/src/dpxcrypt.h,v 1.1 2003/08/05 07:09:09 chofchof Exp $
00002  
00003     This is DVIPDFMx, an eXtended version of DVIPDFM by Mark A. Wicks.
00004 
00005     Copyright (C) 2003 by Jin-Hwan Cho and Shunsaku Hirata,
00006     the DVIPDFMx project team <dvipdfmx@project.ktug.or.kr>
00007     
00008     This program is free software; you can redistribute it and/or modify
00009     it under the terms of the GNU General Public License as published by
00010     the Free Software Foundation; either version 2 of the License, or
00011     (at your option) any later version.
00012     
00013     This program is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016     GNU General Public License for more details.
00017     
00018     You should have received a copy of the GNU General Public License
00019     along with this program; if not, write to the Free Software
00020     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00021 */
00022 
00023 #ifndef _DPXCRYPT_H_
00024 #define _DPXCRYPT_H_
00025 
00026 #include <stdio.h>
00027 
00028 /* libgcrypt md5 */
00029 typedef struct {
00030   unsigned long A,B,C,D; /* chaining variables */
00031   unsigned long nblocks;
00032   unsigned char buf[64];
00033   int count;
00034 } MD5_CONTEXT;
00035 
00036 void MD5_init (MD5_CONTEXT *ctx);
00037 void MD5_write (MD5_CONTEXT *ctx, unsigned char *inbuf, unsigned long inlen);
00038 void MD5_final (unsigned char *outbuf, MD5_CONTEXT *ctx);
00039 
00040 /* libgcrypt arcfour */
00041 typedef struct {
00042   int idx_i, idx_j;
00043   unsigned char sbox[256];
00044 } ARC4_KEY;
00045 
00046 void ARC4 (ARC4_KEY *ctx, unsigned long len, const unsigned char *inbuf, unsigned char *outbuf);
00047 void ARC4_set_key (ARC4_KEY *ctx, unsigned int keylen, const unsigned char *key);
00048 
00049 #endif /* _DPXCRYPT_H_ */