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 import "package:crypto/crypto.dart"; | 5 import 'package:crypto/crypto.dart'; |
6 import "package:test/test.dart"; | 6 import 'package:test/test.dart'; |
7 | 7 |
8 import 'utils.dart'; | 8 import 'utils.dart'; |
9 | 9 |
10 void main() { | 10 void main() { |
11 group("standard vector", () { | 11 group('standard vector', () { |
12 for (var i = 0; i < _inputs.length; i++) { | 12 for (var i = 0; i < _inputs.length; i++) { |
13 test(_macs[i], () { | 13 test(_macs[i], () { |
14 expectHmacEquals(md5, _inputs[i], _keys[i], _macs[i]); | 14 expectHmacEquals(md5, _inputs[i], _keys[i], _macs[i]); |
15 }); | 15 }); |
16 } | 16 } |
17 }); | 17 }); |
18 } | 18 } |
19 | 19 |
20 // Data from http://tools.ietf.org/html/rfc2202. | 20 // Data from http://tools.ietf.org/html/rfc2202. |
21 const _inputs = const [ | 21 const _inputs = const [ |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 | 102 |
103 const _macs = const [ | 103 const _macs = const [ |
104 '9294727a3638bb1c13f48ef8158bfc9d', | 104 '9294727a3638bb1c13f48ef8158bfc9d', |
105 '750c783e6ab0b503eaa86e310a5db738', | 105 '750c783e6ab0b503eaa86e310a5db738', |
106 '56be34521d144c88dbb8c733f0e8b3f6', | 106 '56be34521d144c88dbb8c733f0e8b3f6', |
107 '697eaf0aca3a3aea3a75164746ffaa79', | 107 '697eaf0aca3a3aea3a75164746ffaa79', |
108 '56461ef2342edc00f9bab995690efd4c', | 108 '56461ef2342edc00f9bab995690efd4c', |
109 '6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd', | 109 '6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd', |
110 '6f630fad67cda0ee1fb1f562db3aa53e' | 110 '6f630fad67cda0ee1fb1f562db3aa53e' |
111 ]; | 111 ]; |
OLD | NEW |