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

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

Issue 11419032: Switch libraries to using new tags. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated to tip of tree. Changed library names to dart.x 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/hash_utils.dart ('k') | sdk/lib/crypto/md5.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
5 class _HMAC implements HMAC { 7 class _HMAC implements HMAC {
6 _HMAC(Hash this._hash, List<int> this._key) : _message = []; 8 _HMAC(Hash this._hash, List<int> this._key) : _message = [];
7 9
8 HMAC update(List<int> data) { 10 HMAC update(List<int> data) {
9 _message.addAll(data); 11 _message.addAll(data);
10 return this; 12 return this;
11 } 13 }
12 14
13 List<int> digest() { 15 List<int> digest() {
14 var blockSize = _hash.blockSize; 16 var blockSize = _hash.blockSize;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 result |= digest[i] ^ computedDigest[i]; 63 result |= digest[i] ^ computedDigest[i];
62 } 64 }
63 return result == 0; 65 return result == 0;
64 } 66 }
65 67
66 // HMAC internal state. 68 // HMAC internal state.
67 Hash _hash; 69 Hash _hash;
68 List<int> _key; 70 List<int> _key;
69 List<int> _message; 71 List<int> _message;
70 } 72 }
OLDNEW
« no previous file with comments | « sdk/lib/crypto/hash_utils.dart ('k') | sdk/lib/crypto/md5.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698