| 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 // TODO(ager, iposva): Get rid of this file when the VM snapshot | 5 // TODO(ager, iposva): Get rid of this file when the VM snapshot |
| 6 // generation can deal with normal library structure. | 6 // generation can deal with normal library structure. |
| 7 | 7 |
| 8 #library('crypto'); | 8 #library('crypto'); |
| 9 | 9 |
| 10 #import('dart:math'); |
| 11 |
| 10 /** | 12 /** |
| 11 * Interface for cryptographic hash functions. | 13 * Interface for cryptographic hash functions. |
| 12 * | 14 * |
| 13 * The [update] method is used to add data to the hash. The [digest] method | 15 * The [update] method is used to add data to the hash. The [digest] method |
| 14 * is used to extract the message digest. | 16 * is used to extract the message digest. |
| 15 * | 17 * |
| 16 * Once the [digest] method has been called no more data can be added using the | 18 * Once the [digest] method has been called no more data can be added using the |
| 17 * [update] method. If [update] is called after the first call to [digest] a | 19 * [update] method. If [update] is called after the first call to [digest] a |
| 18 * HashException is thrown. | 20 * HashException is thrown. |
| 19 * | 21 * |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 /** | 118 /** |
| 117 * HashExceptions are thrown on invalid use of a Hash | 119 * HashExceptions are thrown on invalid use of a Hash |
| 118 * object. | 120 * object. |
| 119 */ | 121 */ |
| 120 class HashException { | 122 class HashException { |
| 121 HashException(String this.message); | 123 HashException(String this.message); |
| 122 toString() => "HashException: $message"; | 124 toString() => "HashException: $message"; |
| 123 String message; | 125 String message; |
| 124 } | 126 } |
| 125 | 127 |
| OLD | NEW |