How to use Unsigned char* string as a normal char* string
<p>I am not able to use the decrypted string. Example I want to copy the decrypted string to other string. If I try to copy using strcpy I get error in decrypt statement . I works fine if I only prints the decrypted string. I got the correct decypted string. But issues start when I try to use the decrypted string for some purpose. what may be the issue ?
I am using the openssl encrytion and decryption.</p>

<pre><code> void kdcStep3(connection_info *connection, char msg[128]) {

printf(KCYN " %s" RESET "\n",connection-&gt;username);

char myUsername[50];
char myPassword[50];
puts(msg);

strcpy(myUsername, strtok(connection-&gt;username, " "));
strcpy(myPassword, strtok(NULL, " "));
puts(myPassword);

  /* A 256 bit key */
  unsigned char *key = (unsigned char *)myPassword;

  /* A 128 bit IV */
  unsigned char *iv = (unsigned char *)"01234567890123456";


  /* Buffer for ciphertext. Ensure the buffer is long enough for the
   * ciphertext which may be longer than the plaintext, dependant on the
   * algorithm and mode
   */
  unsigned char ciphertext[128];

  /* Buffer for the decrypted text */
  unsigned char decryptedtext[128];

  int decryptedtext_len, ciphertext_len;

  /* Initialise the library */
  ERR_load_crypto_strings();
  OpenSSL_add_all_algorithms();
  OPENSSL_config(NULL);

  /* Encrypt the plaintext */
  ciphertext_len = strlen(msg);

  /* Do something useful with the ciphertext here */
  printf("Ciphertext is:\n");
  //BIO_dump_fp (stdout, (const char *)ciphertext, ciphertext_len);

  /* Decrypt the ciphertext */
  decryptedtext_len = decrypt(msg, ciphertext_len, key, iv,
    decryptedtext);

  /* Add a NULL terminator. We are expecting printable text */
  decryptedtext[decryptedtext_len] = '\0';

  /* Show the decrypted text */
  printf("Decrypted text is:\n");
  printf("%s\n", decryptedtext);

  /* Clean up */
  EVP_cleanup();
  ERR_free_strings();


puts((const char*)decryptedtext);


}
</code></pre>