diff options
author | Tor Andersson <tor@ghostscript.com> | 2005-04-14 13:32:06 +0200 |
---|---|---|
committer | Tor Andersson <tor@ghostscript.com> | 2005-04-14 13:32:06 +0200 |
commit | d1d9be4fa01ad42b25a77e924010a39d64723c8b (patch) | |
tree | c4655fd554a37afb29339184176537785f0555b6 /include/fitz/crypt.h | |
parent | f926106a92ece6a0c14ec8c3de5ecb0e1894b2eb (diff) | |
download | mupdf-d1d9be4fa01ad42b25a77e924010a39d64723c8b.tar.xz |
move stream headers back into the fitz fold
Diffstat (limited to 'include/fitz/crypt.h')
-rw-r--r-- | include/fitz/crypt.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/fitz/crypt.h b/include/fitz/crypt.h new file mode 100644 index 00000000..647a1eda --- /dev/null +++ b/include/fitz/crypt.h @@ -0,0 +1,30 @@ +/* md5 digests */ + +typedef struct fz_md5_s fz_md5; + +struct fz_md5_s +{ + unsigned long state[4]; + unsigned long count[2]; + unsigned char buffer[64]; +}; + +void fz_md5init(fz_md5 *state); +void fz_md5update(fz_md5 *state, unsigned char *input, unsigned inlen); +void fz_md5final(fz_md5 *state, unsigned char digest[16]); + +/* arc4 crypto */ + +typedef struct fz_arc4_s fz_arc4; + +struct fz_arc4_s +{ + unsigned x; + unsigned y; + unsigned char state[256]; +}; + +void fz_arc4init(fz_arc4 *state, unsigned char *key, unsigned len); +unsigned char fz_arc4next(fz_arc4 *state); +void fz_arc4encrypt(fz_arc4 *state, unsigned char *dest, unsigned char *src, unsigned len); + |