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

Side by Side Diff: lib/src/hash_sink.dart

Issue 1586453002: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 4 years, 11 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 | « lib/src/hash.dart ('k') | lib/src/hmac.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 library crypto.hash_base;
6
7 import 'dart:typed_data'; 5 import 'dart:typed_data';
8 6
9 import 'package:typed_data/typed_data.dart'; 7 import 'package:typed_data/typed_data.dart';
10 8
11 import 'digest.dart'; 9 import 'digest.dart';
12 import 'utils.dart'; 10 import 'utils.dart';
13 11
14 /// A base class for [Sink] implementations for hash algorithms. 12 /// A base class for [Sink] implementations for hash algorithms.
15 /// 13 ///
16 /// Subclasses should override [updateHash] and [digest]. 14 /// Subclasses should override [updateHash] and [digest].
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // hash. 128 // hash.
131 var offset = _pendingData.length; 129 var offset = _pendingData.length;
132 _pendingData.addAll(new Uint8List(8)); 130 _pendingData.addAll(new Uint8List(8));
133 _pendingData.buffer.asByteData().setUint64(offset, lengthInBits, _endian); 131 _pendingData.buffer.asByteData().setUint64(offset, lengthInBits, _endian);
134 } 132 }
135 133
136 /// Rounds [val] up to the next multiple of [n], as long as [n] is a power of 134 /// Rounds [val] up to the next multiple of [n], as long as [n] is a power of
137 /// two. 135 /// two.
138 int _roundUp(int val, int n) => (val + n - 1) & -n; 136 int _roundUp(int val, int n) => (val + n - 1) & -n;
139 } 137 }
OLDNEW
« no previous file with comments | « lib/src/hash.dart ('k') | lib/src/hmac.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698