Will String.getBytes(“UTF-16”) return the same result on all platforms?

后端 未结 3 940
执念已碎
执念已碎 2021-01-18 17:46

I need to create a hash from a String containing users password. To create the hash, I use a byte array which I get by calling String.getBytes(). But when I cal

3条回答
  •  既然无缘
    2021-01-18 17:58

    I just found this:

    https://github.com/facebook/conceal/issues/138

    which seems to answer negatively your question.

    As per Jon Skeet's answer: the specification is clear. But I guess Android/Mac implementations of Dalvik/JVM don't agree.

提交回复
热议问题