Mercurial > libdvdread4.hg
comparison md5.h @ 26:0d82d0f30c98 src
cosmetics: Convert all tabs to spaces.
author | diego |
---|---|
date | Tue, 23 Sep 2008 09:14:45 +0000 |
parents | ac07d427fbc6 |
children | 98951f8ec89c |
comparison
equal
deleted
inserted
replaced
25:17258a7b3239 | 26:0d82d0f30c98 |
---|---|
70 # endif | 70 # endif |
71 #endif | 71 #endif |
72 | 72 |
73 #undef __P | 73 #undef __P |
74 #if defined (__STDC__) && __STDC__ | 74 #if defined (__STDC__) && __STDC__ |
75 #define __P(x) x | 75 #define __P(x) x |
76 #else | 76 #else |
77 #define __P(x) () | 77 #define __P(x) () |
78 #endif | 78 #endif |
79 | 79 |
80 /* Structure to save state of computation between the single steps. */ | 80 /* Structure to save state of computation between the single steps. */ |
81 struct md5_ctx | 81 struct md5_ctx |
82 { | 82 { |
102 /* Starting with the result of former calls of this function (or the | 102 /* Starting with the result of former calls of this function (or the |
103 initialization function update the context for the next LEN bytes | 103 initialization function update the context for the next LEN bytes |
104 starting at BUFFER. | 104 starting at BUFFER. |
105 It is necessary that LEN is a multiple of 64!!! */ | 105 It is necessary that LEN is a multiple of 64!!! */ |
106 extern void md5_process_block __P ((const void *buffer, size_t len, | 106 extern void md5_process_block __P ((const void *buffer, size_t len, |
107 struct md5_ctx *ctx)); | 107 struct md5_ctx *ctx)); |
108 | 108 |
109 /* Starting with the result of former calls of this function (or the | 109 /* Starting with the result of former calls of this function (or the |
110 initialization function update the context for the next LEN bytes | 110 initialization function update the context for the next LEN bytes |
111 starting at BUFFER. | 111 starting at BUFFER. |
112 It is NOT required that LEN is a multiple of 64. */ | 112 It is NOT required that LEN is a multiple of 64. */ |
113 extern void md5_process_bytes __P ((const void *buffer, size_t len, | 113 extern void md5_process_bytes __P ((const void *buffer, size_t len, |
114 struct md5_ctx *ctx)); | 114 struct md5_ctx *ctx)); |
115 | 115 |
116 /* Process the remaining bytes in the buffer and put result from CTX | 116 /* Process the remaining bytes in the buffer and put result from CTX |
117 in first 16 bytes following RESBUF. The result is always in little | 117 in first 16 bytes following RESBUF. The result is always in little |
118 endian byte order, so that a byte-wise output yields to the wanted | 118 endian byte order, so that a byte-wise output yields to the wanted |
119 ASCII representation of the message digest. | 119 ASCII representation of the message digest. |
148 #if defined __GNUC__ && defined __i386__ | 148 #if defined __GNUC__ && defined __i386__ |
149 static inline md5_uint32 | 149 static inline md5_uint32 |
150 rol(md5_uint32 x, int n) | 150 rol(md5_uint32 x, int n) |
151 { | 151 { |
152 __asm__("roll %%cl,%0" | 152 __asm__("roll %%cl,%0" |
153 :"=r" (x) | 153 :"=r" (x) |
154 :"0" (x),"c" (n)); | 154 :"0" (x),"c" (n)); |
155 return x; | 155 return x; |
156 } | 156 } |
157 #else | 157 #else |
158 # define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) | 158 # define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) |
159 #endif | 159 #endif |