Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(873)

Side by Side Diff: packages/crypto/lib/src/md5.dart

Issue 3015713002: Roll to pickup pool changes
Patch Set: Created 3 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « packages/crypto/lib/src/hmac.dart ('k') | packages/crypto/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:convert'; 5 import 'dart:convert';
6 import 'dart:typed_data'; 6 import 'dart:typed_data';
7 7
8 import 'digest.dart'; 8 import 'digest.dart';
9 import 'hash.dart'; 9 import 'hash.dart';
10 import 'hash_sink.dart'; 10 import 'hash_sink.dart';
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 @override 83 @override
84 void updateHash(Uint32List chunk) { 84 void updateHash(Uint32List chunk) {
85 assert(chunk.length == 16); 85 assert(chunk.length == 16);
86 86
87 var a = digest[0]; 87 var a = digest[0];
88 var b = digest[1]; 88 var b = digest[1];
89 var c = digest[2]; 89 var c = digest[2];
90 var d = digest[3]; 90 var d = digest[3];
91 91
92 var e; 92 int e;
93 var f; 93 int f;
94 94
95 for (var i = 0; i < 64; i++) { 95 for (var i = 0; i < 64; i++) {
96 if (i < 16) { 96 if (i < 16) {
97 e = (b & c) | ((~b & mask32) & d); 97 e = (b & c) | ((~b & mask32) & d);
98 f = i; 98 f = i;
99 } else if (i < 32) { 99 } else if (i < 32) {
100 e = (d & b) | ((~d & mask32) & c); 100 e = (d & b) | ((~d & mask32) & c);
101 f = ((5 * i) + 1) % 16; 101 f = ((5 * i) + 1) % 16;
102 } else if (i < 48) { 102 } else if (i < 48) {
103 e = b ^ c ^ d; 103 e = b ^ c ^ d;
(...skipping 12 matching lines...) Expand all
116 _shiftAmounts[i])); 116 _shiftAmounts[i]));
117 a = temp; 117 a = temp;
118 } 118 }
119 119
120 digest[0] = add32(a, digest[0]); 120 digest[0] = add32(a, digest[0]);
121 digest[1] = add32(b, digest[1]); 121 digest[1] = add32(b, digest[1]);
122 digest[2] = add32(c, digest[2]); 122 digest[2] = add32(c, digest[2]);
123 digest[3] = add32(d, digest[3]); 123 digest[3] = add32(d, digest[3]);
124 } 124 }
125 } 125 }
OLDNEW
« no previous file with comments | « packages/crypto/lib/src/hmac.dart ('k') | packages/crypto/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698