OLD | NEW |
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 part 'crypto_utils.dart'; |
10 #source('hash_utils.dart'); | 10 part 'hash_utils.dart'; |
11 #source('hmac.dart'); | 11 part 'hmac.dart'; |
12 #source('md5.dart'); | 12 part 'md5.dart'; |
13 #source('sha1.dart'); | 13 part 'sha1.dart'; |
14 #source('sha256.dart'); | 14 part 'sha256.dart'; |
15 | 15 |
16 /** | 16 /** |
17 * Interface for cryptographic hash functions. | 17 * Interface for cryptographic hash functions. |
18 * | 18 * |
19 * The [update] method is used to add data to the hash. The [digest] method | 19 * The [update] method is used to add data to the hash. The [digest] method |
20 * is used to extract the message digest. | 20 * is used to extract the message digest. |
21 * | 21 * |
22 * Once the [digest] method has been called no more data can be added using the | 22 * Once the [digest] method has been called no more data can be added using the |
23 * [update] method. If [update] is called after the first call to [digest] a | 23 * [update] method. If [update] is called after the first call to [digest] a |
24 * HashException is thrown. | 24 * HashException is thrown. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 /** | 137 /** |
138 * HashExceptions are thrown on invalid use of a Hash | 138 * HashExceptions are thrown on invalid use of a Hash |
139 * object. | 139 * object. |
140 */ | 140 */ |
141 class HashException { | 141 class HashException { |
142 HashException(String this.message); | 142 HashException(String this.message); |
143 toString() => "HashException: $message"; | 143 toString() => "HashException: $message"; |
144 String message; | 144 String message; |
145 } | 145 } |
146 | 146 |
OLD | NEW |