Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/argon2 added versioning tests for argon2
details: https://anonhg.NetBSD.org/src/rev/5fb7b28b0dfe
branches: trunk
changeset: 845743:5fb7b28b0dfe
user: jhigh <jhigh%NetBSD.org@localhost>
date: Mon Oct 14 14:37:31 2019 +0000
description:
added versioning tests for argon2
diffstat:
tests/usr.bin/argon2/t_argon2.sh | 59 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 59 insertions(+), 0 deletions(-)
diffs (74 lines):
diff -r f0a4a1882fed -r 5fb7b28b0dfe tests/usr.bin/argon2/t_argon2.sh
--- a/tests/usr.bin/argon2/t_argon2.sh Mon Oct 14 13:34:14 2019 +0000
+++ b/tests/usr.bin/argon2/t_argon2.sh Mon Oct 14 14:37:31 2019 +0000
@@ -58,6 +58,59 @@
'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 2 -t 4'
}
+atf_test_case argon2_argon2id_k2096_p1_v10
+argon2_argon2id_k2096_p1_v10_head() {
+ atf_set "descr" "ATF test for argon2 argon2id,k=2096,p=1,v=10"
+}
+argon2_argon2id_k2096_p1_v10_body() {
+ atf_check -s exit:0 -o match:"^\\\$argon2id\\\$v=16\\\$m=2096,t=3,p=1" -x \
+ 'echo -n 'password' | argon2 somesalt -e -id -k 2096 -p 1 -v 10'
+}
+
+atf_test_case argon2_argon2id_k2096_p1_v13
+argon2_argon2id_k2096_p1_v13_head() {
+ atf_set "descr" "ATF test for argon2 argon2id,k=2096,p=1,v=13"
+}
+argon2_argon2id_k2096_p1_v13_body() {
+ atf_check -s exit:0 -o match:"^\\\$argon2id\\\$v=19\\\$m=2096,t=3,p=1" -x \
+ 'echo -n 'password' | argon2 somesalt -e -id -k 2096 -p 1 -v 13'
+}
+
+atf_test_case argon2_argon2i_k2096_p1_v10
+argon2_argon2i_k2096_p1_v10_head() {
+ atf_set "descr" "ATF test for argon2 argon2i,k=2096,p=1,v=10"
+}
+argon2_argon2i_k2096_p1_v10_body() {
+ atf_check -s exit:0 -o match:"^\\\$argon2i\\\$v=16\\\$m=2096,t=3,p=1" -x \
+ 'echo -n 'password' | argon2 somesalt -e -i -k 2096 -p 1 -v 10'
+}
+
+atf_test_case argon2_argon2i_k2096_p1_v13
+argon2_argon2i_k2096_p1_v13_head() {
+ atf_set "descr" "ATF test for argon2 argon2i,k=2096,p=1,v=13"
+}
+argon2_argon2i_k2096_p1_v13_body() {
+ atf_check -s exit:0 -o match:"^\\\$argon2i\\\$v=19\\\$m=2096,t=3,p=1" -x \
+ 'echo -n 'password' | argon2 somesalt -e -i -k 2096 -p 1 -v 13'
+}
+
+atf_test_case argon2_argon2d_k2096_p1_v10
+argon2_argon2d_k2096_p1_v10_head() {
+ atf_set "descr" "ATF test for argon2 argon2d,k=2096,p=1,v=10"
+}
+argon2_argon2d_k2096_p1_v10_body() {
+ atf_check -s exit:0 -o match:"^\\\$argon2d\\\$v=16\\\$m=2096,t=3,p=1" -x \
+ 'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 1 -v 10'
+}
+
+atf_test_case argon2_argon2d_k2096_p1_v13
+argon2_argon2d_k2096_p1_v13_head() {
+ atf_set "descr" "ATF test for argon2 argon2d,k=2096,p=1,v=13"
+}
+argon2_argon2d_k2096_p1_v13_body() {
+ atf_check -s exit:0 -o match:"^\\\$argon2d\\\$v=19\\\$m=2096,t=3,p=1" -x \
+ 'echo -n 'password' | argon2 somesalt -e -d -k 2096 -p 1 -v 13'
+}
atf_init_test_cases()
{
@@ -67,4 +120,10 @@
atf_add_test_case argon2_argon2id_k2096_p2_t3
atf_add_test_case argon2_argon2i_k2096_p1_t4
atf_add_test_case argon2_argon2d_k2096_p2_t4
+ atf_add_test_case argon2_argon2id_k2096_p1_v10
+ atf_add_test_case argon2_argon2id_k2096_p1_v13
+ atf_add_test_case argon2_argon2i_k2096_p1_v10
+ atf_add_test_case argon2_argon2i_k2096_p1_v13
+ atf_add_test_case argon2_argon2d_k2096_p1_v10
+ atf_add_test_case argon2_argon2d_k2096_p1_v13
}
Home |
Main Index |
Thread Index |
Old Index