annotate ezBAMQC/src/htslib/cram/md5.h @ 4:50a9d8992e65

Uploaded
author cshl-bsr
date Tue, 29 Mar 2016 15:33:36 -0400
parents dfa3745e5fd8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
1 #ifdef __cplusplus
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
2 extern "C" {
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
3 #endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
4
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
5 /*
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
6 * This is an OpenSSL-compatible implementation of the RSA Data Security, Inc.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
7 * MD5 Message-Digest Algorithm (RFC 1321).
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
8 *
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
9 * Homepage:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
10 * http://openwall.info/wiki/people/solar/software/public-domain-source-code/md5
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
11 *
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
12 * Author:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
13 * Alexander Peslyak, better known as Solar Designer <solar at openwall.com>
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
14 *
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
15 * This software was written by Alexander Peslyak in 2001. No copyright is
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
16 * claimed, and the software is hereby placed in the public domain.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
17 * In case this attempt to disclaim copyright and place the software in the
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
18 * public domain is deemed null and void, then the software is
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
19 * Copyright (c) 2001 Alexander Peslyak and it is hereby released to the
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
20 * general public under the following terms:
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
21 *
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
22 * Redistribution and use in source and binary forms, with or without
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
23 * modification, are permitted.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
24 *
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
25 * There's ABSOLUTELY NO WARRANTY, express or implied.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
26 *
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
27 * See md5.c for more information.
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
28 */
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
29
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
30 #ifdef HAVE_OPENSSL
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
31 #include <openssl/md5.h>
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
32 #elif !defined(_MD5_H)
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
33 #define _MD5_H
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
34
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
35 /* Any 32-bit or wider unsigned integer data type will do */
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
36 typedef unsigned int MD5_u32plus;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
37
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
38 typedef struct {
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
39 MD5_u32plus lo, hi;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
40 MD5_u32plus a, b, c, d;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
41 unsigned char buffer[64];
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
42 MD5_u32plus block[16];
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
43 } MD5_CTX;
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
44
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
45 extern void MD5_Init(MD5_CTX *ctx);
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
46 extern void MD5_Update(MD5_CTX *ctx, void *data, unsigned long size);
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
47 extern void MD5_Final(unsigned char *result, MD5_CTX *ctx);
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
48
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
49 #endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
50
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
51 #ifdef __cplusplus
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
52 }
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
53 #endif
dfa3745e5fd8 Uploaded
youngkim
parents:
diff changeset
54