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

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

Issue 11410064: Correctly pass constructor arguments to _HMAC. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « no previous file | no next file » | 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('dart:crypto'); 5 #library('dart:crypto');
6 6
7 #import('dart:math'); 7 #import('dart:math');
8 8
9 #source('crypto_utils.dart'); 9 #source('crypto_utils.dart');
10 #source('hash_utils.dart'); 10 #source('hash_utils.dart');
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 /** 76 /**
77 * Hash-based Message Authentication Code support. 77 * Hash-based Message Authentication Code support.
78 * 78 *
79 * The [update] method is used to add data to the message. The [digest] method 79 * The [update] method is used to add data to the message. The [digest] method
80 * is used to extract the message authentication code. 80 * is used to extract the message authentication code.
81 */ 81 */
82 abstract class HMAC { 82 abstract class HMAC {
83 /** 83 /**
84 * Create an [HMAC] object from a [Hash] and a key. 84 * Create an [HMAC] object from a [Hash] and a key.
85 */ 85 */
86 factory HMAC(Hash hash, List<int> key) => new _HMAC(); 86 factory HMAC(Hash hash, List<int> key) => new _HMAC(hash, key);
87 87
88 /** 88 /**
89 * Add a list of bytes to the message. 89 * Add a list of bytes to the message.
90 */ 90 */
91 HMAC update(List<int> data); 91 HMAC update(List<int> data);
92 92
93 /** 93 /**
94 * Perform the actual computation and extract the message digest 94 * Perform the actual computation and extract the message digest
95 * as a list of bytes. 95 * as a list of bytes.
96 */ 96 */
(...skipping 25 matching lines...) Expand all
122 /** 122 /**
123 * HashExceptions are thrown on invalid use of a Hash 123 * HashExceptions are thrown on invalid use of a Hash
124 * object. 124 * object.
125 */ 125 */
126 class HashException { 126 class HashException {
127 HashException(String this.message); 127 HashException(String this.message);
128 toString() => "HashException: $message"; 128 toString() => "HashException: $message";
129 String message; 129 String message;
130 } 130 }
131 131
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698