Avoid duplicate program names

Visual Studio and CMake didn't like having targets with the same name,
albeit in different directories.

Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
diff --git a/programs/.gitignore b/programs/.gitignore
index 076821f..7fe0401 100644
--- a/programs/.gitignore
+++ b/programs/.gitignore
@@ -13,10 +13,10 @@
 *.exe
 
 aes/crypt_and_hash
-cipher/aead_demo
+cipher/cipher_aead_demo
 hash/generic_sum
 hash/hello
-hash/hmac_demo
+hash/md_hmac_demo
 hash/md5sum
 hash/sha1sum
 hash/sha2sum
diff --git a/programs/Makefile b/programs/Makefile
index fccddc6..31295f6 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -62,10 +62,10 @@
 ## make sure to check that it still works if you tweak the format here.
 APPS = \
 	aes/crypt_and_hash \
-	cipher/aead_demo \
+	cipher/cipher_aead_demo \
 	hash/generic_sum \
 	hash/hello \
-	hash/hmac_demo \
+	hash/md_hmac_demo \
 	pkey/dh_client \
 	pkey/dh_genprime \
 	pkey/dh_server \
@@ -177,9 +177,9 @@
 	echo "  CC    aes/crypt_and_hash.c"
 	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/crypt_and_hash.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
 
-cipher/aead_demo$(EXEXT): cipher/aead_demo.c $(DEP)
-	echo "  CC    cipher/aead_demo.c"
-	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/aead_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+cipher/cipher_aead_demo$(EXEXT): cipher/cipher_aead_demo.c $(DEP)
+	echo "  CC    cipher/cipher_aead_demo.c"
+	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) cipher/cipher_aead_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
 
 hash/generic_sum$(EXEXT): hash/generic_sum.c $(DEP)
 	echo "  CC    hash/generic_sum.c"
@@ -189,9 +189,9 @@
 	echo "  CC    hash/hello.c"
 	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hello.c       $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
 
-hash/hmac_demo$(EXEXT): hash/hmac_demo.c $(DEP)
-	echo "  CC    hash/hmac_demo.c"
-	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/hmac_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+hash/md_hmac_demo$(EXEXT): hash/md_hmac_demo.c $(DEP)
+	echo "  CC    hash/md_hmac_demo.c"
+	$(CC) $(LOCAL_CFLAGS) $(CFLAGS) hash/md_hmac_demo.c    $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
 
 pkey/dh_client$(EXEXT): pkey/dh_client.c $(DEP)
 	echo "  CC    pkey/dh_client.c"
diff --git a/programs/cipher/CMakeLists.txt b/programs/cipher/CMakeLists.txt
index cc16849..93e5f31 100644
--- a/programs/cipher/CMakeLists.txt
+++ b/programs/cipher/CMakeLists.txt
@@ -1,5 +1,5 @@
 set(executables
-    aead_demo
+    cipher_aead_demo
 )
 
 foreach(exe IN LISTS executables)
diff --git a/programs/cipher/aead_demo.c b/programs/cipher/cipher_aead_demo.c
similarity index 98%
rename from programs/cipher/aead_demo.c
rename to programs/cipher/cipher_aead_demo.c
index 894225d..4da1bfc 100644
--- a/programs/cipher/aead_demo.c
+++ b/programs/cipher/cipher_aead_demo.c
@@ -66,7 +66,7 @@
 
 /* The real program starts here. */
 
-const char usage[] = "Usage: aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]";
+const char usage[] = "Usage: cipher_aead_demo [aes128-gcm|aes256-gcm|aes128-gcm_8|chachapoly]";
 
 /* Dummy data for encryption: IV/nonce, additional data, 2-part message */
 const unsigned char iv1[12] = { 0x00 };
diff --git a/programs/hash/CMakeLists.txt b/programs/hash/CMakeLists.txt
index 9ff1df1..da98188 100644
--- a/programs/hash/CMakeLists.txt
+++ b/programs/hash/CMakeLists.txt
@@ -1,7 +1,7 @@
 set(executables
     generic_sum
     hello
-    hmac_demo
+    md_hmac_demo
 )
 
 foreach(exe IN LISTS executables)
diff --git a/programs/hash/hmac_demo.c b/programs/hash/md_hmac_demo.c
similarity index 100%
rename from programs/hash/hmac_demo.c
rename to programs/hash/md_hmac_demo.c
diff --git a/programs/psa/aead_demo.c b/programs/psa/aead_demo.c
index 4c7a522..396e828 100644
--- a/programs/psa/aead_demo.c
+++ b/programs/psa/aead_demo.c
@@ -4,7 +4,7 @@
  * This program AEAD-encrypts a message, using the algorithm and key size
  * specified on the command line, using the multi-part API.
  *
- * It comes with a companion program cipher/aead_demo.c, which does the same
+ * It comes with a companion program cipher/cipher_aead_demo.c, which does the same
  * operations with the legacy Cipher API. The goal is that comparing the two
  * programs will help people migrating to the PSA Crypto API.
  *
@@ -18,7 +18,7 @@
  * On the other hand, with PSA, the algorithms encodes the desired tag length;
  * with Cipher the desired tag length needs to be tracked separately.
  *
- * This program and its companion cipher/aead_demo.c illustrate this by doing the
+ * This program and its companion cipher/cipher_aead_demo.c illustrate this by doing the
  * same sequence of multi-part AEAD computation with both APIs; looking at the
  * two side by side should make the differences and similarities clear.
  */
diff --git a/programs/psa/hmac_demo.c b/programs/psa/hmac_demo.c
index 2786bb3..54fea03 100644
--- a/programs/psa/hmac_demo.c
+++ b/programs/psa/hmac_demo.c
@@ -3,7 +3,7 @@
  *
  * This programs computes the HMAC of two messages using the multi-part API.
  *
- * It comes with a companion program hash/hmac_demo.c, which does the same
+ * It comes with a companion program hash/md_hmac_demo.c, which does the same
  * operations with the legacy MD API. The goal is that comparing the two
  * programs will help people migrating to the PSA Crypto API.
  *
@@ -13,7 +13,7 @@
  * objects: (1) a psa_key_id_t to hold the key, and (2) a psa_operation_t for
  * multi-part progress.
  *
- * This program and its companion hash/hmac_demo.c illustrate this by doing the
+ * This program and its companion hash/md_hmac_demo.c illustrate this by doing the
  * same sequence of multi-part HMAC computation with both APIs; looking at the
  * two side by side should make the differences and similarities clear.
  */