Module Name:    src
Committed By:   jhigh
Date:           Mon Oct 14 14:37:31 UTC 2019

Modified Files:
        src/tests/usr.bin/argon2: t_argon2.sh

Log Message:
added versioning tests for argon2


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/argon2/t_argon2.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/usr.bin/argon2/t_argon2.sh
diff -u src/tests/usr.bin/argon2/t_argon2.sh:1.1 src/tests/usr.bin/argon2/t_argon2.sh:1.2
--- src/tests/usr.bin/argon2/t_argon2.sh:1.1	Mon Oct 14 03:47:20 2019
+++ src/tests/usr.bin/argon2/t_argon2.sh	Mon Oct 14 14:37:31 2019
@@ -58,6 +58,59 @@ argon2_argon2d_k2096_p2_t4_body() {
 		'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_init_test_cases()
 	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
 }

Reply via email to