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 #source('crypto_utils.dart'); |
10 #source('hash_utils.dart'); | 10 #source('hash_utils.dart'); |
(...skipping 28 matching lines...) Expand all Loading... |
39 List<int> digest(); | 39 List<int> digest(); |
40 | 40 |
41 /** | 41 /** |
42 * Returns a new instance of this hash function. | 42 * Returns a new instance of this hash function. |
43 */ | 43 */ |
44 Hash newInstance(); | 44 Hash newInstance(); |
45 | 45 |
46 /** | 46 /** |
47 * Block size of the hash in bytes. | 47 * Block size of the hash in bytes. |
48 */ | 48 */ |
49 int get blockSize(); | 49 int get blockSize; |
50 } | 50 } |
51 | 51 |
52 /** | 52 /** |
53 * SHA1 hash function implementation. | 53 * SHA1 hash function implementation. |
54 */ | 54 */ |
55 interface SHA1 extends Hash default _SHA1 { | 55 interface SHA1 extends Hash default _SHA1 { |
56 SHA1(); | 56 SHA1(); |
57 } | 57 } |
58 | 58 |
59 /** | 59 /** |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |