I keep getting an extra characters added to the end of my char arrays. When I execute the code below, I get "Hash: 50jMstBtCmj7s roflC}B. Where did the extra C}B at the end of the key array come from? I can't seem to get rid of it, and it's throwing off the results of the crypt() call. Thanks in advance.
string salt = "50"; char key = ""; string s; //key = ''; key = 'r'; key = 'o'; key = 'f'; key = 'l'; s = crypt(key, salt); printf ("Hash: %s %s\n", s, key); return 0;