OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // MD5 block step. | 5 // MD5 block step. |
6 // In its own file so that a faster assembly or C version | 6 // In its own file so that a faster assembly or C version |
7 // can be substituted easily. | 7 // can be substituted easily. |
8 | 8 |
9 package md5 | 9 package md5 |
10 | 10 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 a = a<<s | a>>(32-s); | 157 a = a<<s | a>>(32-s); |
158 a += b; | 158 a += b; |
159 a, b, c, d = d, a, b, c; | 159 a, b, c, d = d, a, b, c; |
160 } | 160 } |
161 | 161 |
162 a += aa; | 162 a += aa; |
163 b += bb; | 163 b += bb; |
164 c += cc; | 164 c += cc; |
165 d += dd; | 165 d += dd; |
166 | 166 |
167 » » p = p[_Chunk:len(p)]; | 167 » » p = p[_Chunk:]; |
168 n += _Chunk; | 168 n += _Chunk; |
169 } | 169 } |
170 | 170 |
171 dig.s[0] = a; | 171 dig.s[0] = a; |
172 dig.s[1] = b; | 172 dig.s[1] = b; |
173 dig.s[2] = c; | 173 dig.s[2] = c; |
174 dig.s[3] = d; | 174 dig.s[3] = d; |
175 return n; | 175 return n; |
176 } | 176 } |
OLD | NEW |