| 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'); | 10 #import('dart:math'); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 List<int> digest(); | 35 List<int> digest(); |
| 36 | 36 |
| 37 /** | 37 /** |
| 38 * Returns a new instance of this hash function. | 38 * Returns a new instance of this hash function. |
| 39 */ | 39 */ |
| 40 Hash newInstance(); | 40 Hash newInstance(); |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * Block size of the hash in bytes. | 43 * Block size of the hash in bytes. |
| 44 */ | 44 */ |
| 45 int get blockSize(); | 45 int get blockSize; |
| 46 } | 46 } |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * SHA1 hash function implementation. | 49 * SHA1 hash function implementation. |
| 50 */ | 50 */ |
| 51 interface SHA1 extends Hash default _SHA1 { | 51 interface SHA1 extends Hash default _SHA1 { |
| 52 SHA1(); | 52 SHA1(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 /** | 55 /** |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 /** | 118 /** |
| 119 * HashExceptions are thrown on invalid use of a Hash | 119 * HashExceptions are thrown on invalid use of a Hash |
| 120 * object. | 120 * object. |
| 121 */ | 121 */ |
| 122 class HashException { | 122 class HashException { |
| 123 HashException(String this.message); | 123 HashException(String this.message); |
| 124 toString() => "HashException: $message"; | 124 toString() => "HashException: $message"; |
| 125 String message; | 125 String message; |
| 126 } | 126 } |
| 127 | 127 |
| OLD | NEW |