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 /** | 5 /** |
6 * Cryptographic algorithms, with support for hash functions such as | 6 * Cryptographic algorithms, with support for hash functions such as |
7 * SHA-1, SHA-256, HMAC, and MD5. | 7 * SHA-1, SHA-256, HMAC, and MD5. |
8 */ | 8 */ |
9 library crypto; | 9 library crypto; |
10 | 10 |
11 import 'dart:math'; | 11 import 'dart:math'; |
| 12 import 'dart:typed_data'; |
12 | 13 |
13 part 'src/crypto_utils.dart'; | 14 part 'src/crypto_utils.dart'; |
14 part 'src/hash_utils.dart'; | 15 part 'src/hash_utils.dart'; |
15 part 'src/hmac.dart'; | 16 part 'src/hmac.dart'; |
16 part 'src/md5.dart'; | 17 part 'src/md5.dart'; |
17 part 'src/sha1.dart'; | 18 part 'src/sha1.dart'; |
18 part 'src/sha256.dart'; | 19 part 'src/sha256.dart'; |
19 | 20 |
20 /** | 21 /** |
21 * Interface for cryptographic hash functions. | 22 * Interface for cryptographic hash functions. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 * Accepts both URL safe and unsafe Base 64 encoded strings. | 101 * Accepts both URL safe and unsafe Base 64 encoded strings. |
101 * | 102 * |
102 * Throws a FormatException exception if input contains invalid characters. | 103 * Throws a FormatException exception if input contains invalid characters. |
103 * | 104 * |
104 * Based on [RFC 4648](http://tools.ietf.org/html/rfc4648) | 105 * Based on [RFC 4648](http://tools.ietf.org/html/rfc4648) |
105 */ | 106 */ |
106 static List<int> base64StringToBytes(String input) { | 107 static List<int> base64StringToBytes(String input) { |
107 return _CryptoUtils.base64StringToBytes(input); | 108 return _CryptoUtils.base64StringToBytes(input); |
108 } | 109 } |
109 } | 110 } |
OLD | NEW |