Cannot output correct hash in Java. What is wrong?

前端 未结 3 1085
忘掉有多难
忘掉有多难 2021-02-10 21:00

In my Android app I have a SHA256 hash which I must further hash with the RIPEMD160 message digest algorithm.

I can output the correct sha256 and ripemd160 hash of any s

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-10 21:10

    To get printable version of byte[] digest use this code:

    StringBuffer hexString = new StringBuffer();
    for (int i=0;i

    and then call hexString.toString();

提交回复
热议问题