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

Side by Side Diff: test/hmac_sha256_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 | « test/hmac_sha1_test.dart ('k') | test/utils.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 // Library tag to allow the test to run on Dartium. 5 // Library tag to allow the test to run on Dartium.
6 import "package:crypto/crypto.dart"; 6 import "package:crypto/crypto.dart";
7 import "package:test/test.dart"; 7 import "package:test/test.dart";
8 8
9 import 'utils.dart'; 9 import 'utils.dart';
10 10
11 void main() { 11 void main() {
12 group("standard vector", () { 12 group("standard vector", () {
13 for (var i = 0; i < _inputs.length; i++) { 13 for (var i = 0; i < _inputs.length; i++) {
14 test(_macs[i], () { 14 test(_macs[i], () {
15 expectHmacEquals(new SHA256(), _inputs[i], _keys[i], _macs[i]); 15 expectHmacEquals(sha256, _inputs[i], _keys[i], _macs[i]);
16 }); 16 });
17 } 17 }
18 }); 18 });
19 } 19 }
20 20
21 // Standard test vectors from: 21 // Standard test vectors from:
22 // http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip 22 // http://csrc.nist.gov/groups/STM/cavp/documents/mac/hmactestvectors.zip
23 23
24 const _inputs = const [ 24 const _inputs = const [
25 const [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x80, 0x5f, 0x83, 0x40, 0x39, 0xb3, 0x45, 0xf8, 0x55, 0xcf, 0xe1, 0x9c, 0x44, 0xb5, 0x5a, 0xf2, 0x41, 0xff, 0xf3, 0xff, 0xcd, 0x80, 0x45, 0x cd, 0x5c, 0x28, 0x8e, 0x6c, 0x4e, 0x28, 0x4c, 0x37, 0x20, 0x57, 0x0b, 0x58, 0xe4 , 0xd4, 0x7b, 0x8f, 0xee, 0xed, 0xc5, 0x2f, 0xd1, 0x40, 0x1f, 0x69, 0x8a, 0x20, 0x9f, 0xcc, 0xfa, 0x3b, 0x4c, 0x0d, 0x9a, 0x79, 0x7b, 0x04, 0x6a, 0x27, 0x59, 0x f8, 0x2a, 0x54, 0xc4, 0x1c, 0xcd, 0x7b, 0x5f, 0x59, 0x2b ],
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 '988d4a6fa87f8138d754c5de9d176c45eaccf8eb8ca1799d87c8f04a966b6f4c', 697 '988d4a6fa87f8138d754c5de9d176c45eaccf8eb8ca1799d87c8f04a966b6f4c',
698 'ee6492a669e22bcf19bbdfc45495cd0efa9c2f2ef5d42831e3f13a545cbcd6a1', 698 'ee6492a669e22bcf19bbdfc45495cd0efa9c2f2ef5d42831e3f13a545cbcd6a1',
699 '9611e838fb1d816a0ff9cd269217d93258c34df9e26b74476fe4da0f7dee2335', 699 '9611e838fb1d816a0ff9cd269217d93258c34df9e26b74476fe4da0f7dee2335',
700 '0bb4127d89d9073ea425c303adc3f9db39e40adac23ea61fba8b6e251d79390f', 700 '0bb4127d89d9073ea425c303adc3f9db39e40adac23ea61fba8b6e251d79390f',
701 '109ebb4cb2ad746762b6652fc63b99019857ae89acfe9807648c3cfa151fed42', 701 '109ebb4cb2ad746762b6652fc63b99019857ae89acfe9807648c3cfa151fed42',
702 'b53db6bf0c8317586ae6c1a1e2857f241bf55dddd1b423578c6949d4bf014611', 702 'b53db6bf0c8317586ae6c1a1e2857f241bf55dddd1b423578c6949d4bf014611',
703 '4a34bd4dfeef7fa1dc739280f16a3fe1281a51311c10a920ab43d406d4ae3370', 703 '4a34bd4dfeef7fa1dc739280f16a3fe1281a51311c10a920ab43d406d4ae3370',
704 '4de7bab7fe9a0a9bf7b51a7cdf7d929f2b1c6ff4575fd527baba1efdf4254890', 704 '4de7bab7fe9a0a9bf7b51a7cdf7d929f2b1c6ff4575fd527baba1efdf4254890',
705 '4f1ee7cb36c58803a8721d4ac8c4cf8cae5d8832392eed2a96dc59694252801b', 705 '4f1ee7cb36c58803a8721d4ac8c4cf8cae5d8832392eed2a96dc59694252801b',
706 ]; 706 ];
OLDNEW
« no previous file with comments | « test/hmac_sha1_test.dart ('k') | test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698