Conver char-Array to MD5-Hash

Hello,

I´m trying to convert a char array to a MD5 hash with a Arduino Mega with this libary: https://github.com/tzikis/ArduinoMD5

Here’s my Source:

#include <MD5.h>


  char test1[6]={'1','2','3','4','5','7'};
  char *test2="123457";
  byte zaehler;



void setup()
{
  //initialize serial
  Serial.begin(9600);
  //give it a second
  delay(1000);
  
  
 

  //generate the MD5 hash for our string
  unsigned char* hash=MD5::make_hash(test);
  //generate the digest (hex encoding) of our hash
  char *md5str = MD5::make_digest(hash, 16);
  free(hash);
  //print it on our serial monitor
  Serial.println(md5str);
  //Give the Memory back to the System if you run the md5 Hash generation in a loop
  free(md5str);
  Serial.println(md5str);

}

void loop()
{
  Serial.println(test);
   
}

The problem is, that if I use the array test1 in the hash funktion the hash result is not the same as the hashed test2 variable. Why?

Maybe because test1 has no terminator?

  char test1[7]={'1','2','3','4','5','7',0};

Oh, such a stupid mistake. Thank you very much, you really helped me out :D