Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2625] uft-8 to utf-16 string conversions cause incorrect Ti.Utils md5HexDigest and base64*code results

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionInvalid
Resolution Date2017-06-09T16:54:53.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsandroid, utils
ReporterPaul Dowsett
AssigneeIngo Muschenetz
Created2011-04-15T03:25:10.000+0000
Updated2017-06-09T16:54:53.000+0000

Description

See title. Already discussed with Don and Marshall.
Tested on Android only, Ti SDK 1.5.X (17th Dec 2010) and 1.6 (19th Dec 2010).

To test the issue:

var fileContents = thisFile.read().toString();
var md5File = Ti.Utils.md5HexDigest(fileContents);
Ti.API.info('file md5 = '+md5File);

Note that the md5 of a string is correct, as the following shows:

var md5 = Ti.Utils.md5HexDigest("thisisatest");
Ti.API.info('md5 = '+md5);

returns different results to the following (on linux system):

printf thisisatest | md5sum

Both return f830f69d23b8224b512a0dc2f5aec974

Comments

  1. Lee Morris 2017-06-09

    Closing ticket due to time passed, any problems please open a new ticket.

JSON Source