libsignal-protocol-java icon indicating copy to clipboard operation
libsignal-protocol-java copied to clipboard

Displayable fingerprint computation depends on platform character set

Open mmdriley opened this issue 8 years ago • 1 comments

This call to String.getBytes() should probably be replaced with getBytes(StandardCharsets.UTF_8) or getBytes(Charset.forName("UTF-8")).

Thankfully this seems to default to UTF-8 on Android anyway, though it's still worth being explicit: http://stackoverflow.com/questions/2207631/android-default-character-encoding

mmdriley avatar Oct 18 '16 22:10 mmdriley

There are many calls to getBytes() throughout the entire codebase which do not specify a character encoding. We've always depended on UTF8 being mandatory and default on Android. Maybe one day we'll go through and make them all explicit.

moxie0 avatar Oct 19 '16 17:10 moxie0