Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Side by Side Diff: test/hmac_md5_test.dart

Issue 1826543003: Update deprecations. (Closed) Base URL: git@github.com:dart-lang/crypto.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pubspec.yaml ('k') | test/hmac_sha1_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(new 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 [
22 const [ 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 ], 22 const [ 0x48, 0x69, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65 ],
23 const [ 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, 0x79, 0x61, 0x20, 0x77 , 0x61, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x3f ], 23 const [ 0x77, 0x68, 0x61, 0x74, 0x20, 0x64, 0x6f, 0x20, 0x79, 0x61, 0x20, 0x77 , 0x61, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x3f ],
24 const [ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd , 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,0xdd, 0 xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd ], 24 const [ 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd , 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,0xdd, 0 xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xd d, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd ],
(...skipping 15 matching lines...) Expand all
40 40
41 const _macs = const [ 41 const _macs = const [
42 '9294727a3638bb1c13f48ef8158bfc9d', 42 '9294727a3638bb1c13f48ef8158bfc9d',
43 '750c783e6ab0b503eaa86e310a5db738', 43 '750c783e6ab0b503eaa86e310a5db738',
44 '56be34521d144c88dbb8c733f0e8b3f6', 44 '56be34521d144c88dbb8c733f0e8b3f6',
45 '697eaf0aca3a3aea3a75164746ffaa79', 45 '697eaf0aca3a3aea3a75164746ffaa79',
46 '56461ef2342edc00f9bab995690efd4c', 46 '56461ef2342edc00f9bab995690efd4c',
47 '6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd', 47 '6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd',
48 '6f630fad67cda0ee1fb1f562db3aa53e' 48 '6f630fad67cda0ee1fb1f562db3aa53e'
49 ]; 49 ];
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | test/hmac_sha1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698