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

Side by Side Diff: sdk/lib/crypto/crypto_utils.dart

Issue 11612020: Revert "Switch libraries to using new tags." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/crypto/crypto.dart ('k') | sdk/lib/crypto/hash_utils.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 part of dart.crypto;
6
7 class _LineWrappingStringBuffer { 5 class _LineWrappingStringBuffer {
8 _LineWrappingStringBuffer(int this._lineLength) : _sb = new StringBuffer(); 6 _LineWrappingStringBuffer(int this._lineLength) : _sb = new StringBuffer();
9 7
10 void add(String s) { 8 void add(String s) {
11 if (_lineLength != null && _currentLineLength == _lineLength) { 9 if (_lineLength != null && _currentLineLength == _lineLength) {
12 _sb.add('\r\n'); 10 _sb.add('\r\n');
13 _currentLineLength = 0; 11 _currentLineLength = 0;
14 } 12 }
15 _sb.add(s); 13 _sb.add(s);
16 _currentLineLength++; 14 _currentLineLength++;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 var b1 = bytes[i + 1] & 0xff; 65 var b1 = bytes[i + 1] & 0xff;
68 result.add(table[b0 >> 2]); 66 result.add(table[b0 >> 2]);
69 result.add(table[((b0 << 4) | (b1 >> 4)) & 0x3f]); 67 result.add(table[((b0 << 4) | (b1 >> 4)) & 0x3f]);
70 result.add(table[(b1 << 2) & 0x3f]); 68 result.add(table[(b1 << 2) & 0x3f]);
71 result.add('='); 69 result.add('=');
72 } 70 }
73 71
74 return result.toString(); 72 return result.toString();
75 } 73 }
76 } 74 }
OLDNEW
« no previous file with comments | « sdk/lib/crypto/crypto.dart ('k') | sdk/lib/crypto/hash_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698