| 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 part 'crypto_utils.dart'; | 9 part 'src/crypto_utils.dart'; |
| 10 part 'hash_utils.dart'; | 10 part 'src/hash_utils.dart'; |
| 11 part 'hmac.dart'; | 11 part 'src/hmac.dart'; |
| 12 part 'md5.dart'; | 12 part 'src/md5.dart'; |
| 13 part 'sha1.dart'; | 13 part 'src/sha1.dart'; |
| 14 part 'sha256.dart'; | 14 part 'src/sha256.dart'; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * Interface for cryptographic hash functions. | 17 * Interface for cryptographic hash functions. |
| 18 * | 18 * |
| 19 * The [add] method is used to add data to the hash. The [close] method | 19 * The [add] method is used to add data to the hash. The [close] method |
| 20 * is used to extract the message digest. | 20 * is used to extract the message digest. |
| 21 * | 21 * |
| 22 * Once the [close] method has been called no more data can be added using the | 22 * Once the [close] method has been called no more data can be added using the |
| 23 * [add] method. If [add] is called after the first call to [close] a | 23 * [add] method. If [add] is called after the first call to [close] a |
| 24 * HashException is thrown. | 24 * HashException is thrown. |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 /** | 173 /** |
| 174 * HashExceptions are thrown on invalid use of a Hash | 174 * HashExceptions are thrown on invalid use of a Hash |
| 175 * object. | 175 * object. |
| 176 */ | 176 */ |
| 177 class HashException { | 177 class HashException { |
| 178 HashException(String this.message); | 178 HashException(String this.message); |
| 179 toString() => "HashException: $message"; | 179 toString() => "HashException: $message"; |
| 180 String message; | 180 String message; |
| 181 } | 181 } |
| 182 | 182 |
| OLD | NEW |