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

Side by Side Diff: pkg/compiler/lib/src/hash/sha1.dart

Issue 2221893003: pkg/compiler: fix imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « pkg/compiler/lib/src/elements/visitor.dart ('k') | pkg/compiler/lib/src/helpers/helpers.dart » ('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 /** 5 /**
6 * SHA-1. 6 * SHA-1.
7 * Ripped from package:crypto. 7 * Ripped from package:crypto.
8 */ 8 */
9 library sha1; 9 library sha1;
10 10
11 import 'dart:convert';
11 import 'dart:math' show pow; 12 import 'dart:math' show pow;
12 import 'dart:convert';
13 13
14 import '../io/code_output.dart' show CodeOutputListener; 14 import '../io/code_output.dart' show CodeOutputListener;
15 15
16 class Hasher implements CodeOutputListener { 16 class Hasher implements CodeOutputListener {
17 Hash _hasher = new SHA1(); 17 Hash _hasher = new SHA1();
18 String _hashString; 18 String _hashString;
19 19
20 @override 20 @override
21 void onDone(int length) { 21 void onDone(int length) {
22 // Do nothing. 22 // Do nothing.
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 int y = bytes[i + 1]; 361 int y = bytes[i + 1];
362 out[j++] = lookup.codeUnitAt(x >> 2); 362 out[j++] = lookup.codeUnitAt(x >> 2);
363 out[j++] = lookup.codeUnitAt(((x << 4) | (y >> 4)) & 0x3F); 363 out[j++] = lookup.codeUnitAt(((x << 4) | (y >> 4)) & 0x3F);
364 out[j++] = lookup.codeUnitAt((y << 2) & 0x3F); 364 out[j++] = lookup.codeUnitAt((y << 2) & 0x3F);
365 out[j++] = PAD; 365 out[j++] = PAD;
366 } 366 }
367 367
368 return new String.fromCharCodes(out); 368 return new String.fromCharCodes(out);
369 } 369 }
370 } 370 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/visitor.dart ('k') | pkg/compiler/lib/src/helpers/helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698