md5 hashing acting strangly?

Sean Campbell via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 16 05:06:55 PDT 2014


i have the following code
char[] Etag(string file){
	auto info = DirEntry(file);
	ubyte[16] hash = md5Of(to!string(info.timeLastAccessed.day)~
	                       to!string(info.timeLastAccessed.month)~
	                       to!string(~info.timeLastAccessed.year)~
	                       file);
	char[] hashstring = toHexString(hash);
	writeln(hashstring);
	return hashstring;
}
the proper hash string prints out in the console, but when i try 
to use the return value of Etag it becomes an obscure string?


More information about the Digitalmars-d-learn mailing list