From 9f2c0ca0ef9d8f7a4f2c90210107a5b26eaf4433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Tvrd=C3=ADk?= Date: Tue, 12 May 2015 12:27:47 +0200 Subject: [PATCH] SHA Tests: Use a longer (160-length) string --- lib/sha1_test.c | 4 ++++ lib/sha256_test.c | 8 ++++---- lib/sha512_test.c | 8 ++++---- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/sha1_test.c b/lib/sha1_test.c index 2c17fe79..d33c419f 100644 --- a/lib/sha1_test.c +++ b/lib/sha1_test.c @@ -61,6 +61,10 @@ t_sha1(void) .in = "12345678901234567890123456789012345678901234567890123456789012345678901234567890", .out = "50abf5706a150990a08b2c5ea40fa0e585554732", }, + { + .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + .out = "6a64fcc1fb970f7339ce886601775d2efea5cd4b", + }, }; bt_assert_fn_in_out(get_sha1, in_out, "'%s'", "'%s'"); diff --git a/lib/sha256_test.c b/lib/sha256_test.c index e4e3ac18..9ef2f8c3 100644 --- a/lib/sha256_test.c +++ b/lib/sha256_test.c @@ -67,8 +67,8 @@ t_sha256(void) .out = "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1", }, { - .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - .out = "970d31b428de8fea74b16484d8a8adb2c9e1bd974d7c621fd04332bc3499f117", + .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + .out = "bf18b43b61652b5d73f41ebf3d72e5e43aebf5076f497dde31ea3de9de4998ef", }, }; @@ -101,8 +101,8 @@ t_sha224(void) .out = "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525", }, { - .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - .out = "8a75b49f36c174693ee51a3f47c845d327dea06eab343cc15e975adf", + .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + .out = "cca7dd1a332a17775d8b0429bdb45055c2d4368ebaab0c7cf385586e", }, }; diff --git a/lib/sha512_test.c b/lib/sha512_test.c index 5c5aa85d..70481e52 100644 --- a/lib/sha512_test.c +++ b/lib/sha512_test.c @@ -66,8 +66,8 @@ t_sha512(void) .out = "204a8fc6dda82f0a0ced7beb8e08a41657c16ef468b228a8279be331a703c33596fd15c13b1b07f9aa1d3bea57789ca031ad85c7a71dd70354ec631238ca3445", }, { - .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - .out = "86497b815f64702e2ac6aca1f1d16f7159b4f0b34f6e92a41e632982a7291465957e0ef171042b9630bb66c6e35051613f99bdc95c371eeb46bff8c897eba6e9", + .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + .out = "415509a1c345371acb3e27a88b3835e3b6dfebcbbab5134850596f4db64d7bb22ac42c3cd179446a80c92b8be955460eb536eac01389a7e1fdf09d1dca83922f", }, }; @@ -101,8 +101,8 @@ t_sha384(void) .out = "3391fdddfc8dc7393707a65b1b4709397cf8b1d162af05abfe8f450de5f36bc6b0455a8520bc4e6f5fe95b1fe3c8452b", }, { - .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - .out = "7b2cc66b0f621c1cb45c8dec93becf425d08f48d0e652154f8fffdde3ac7b1d2c6b19e9e507867301a3b604a8dafd3ba", + .in = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + .out = "6452928a62ca915a60f2d16ea22cc832d8ecb35443d78a3ff6986e7def9174a1dc16ce2ff65d3ed1666db98357f3c05e", }, };