How create SHA224SUM in java

2020-06-07 04:53发布

问题:

I need create hash from my string using analog Linux command SHA224SUM in java under Android.

I try use:

      MessageDigest messageDigest224 = MessageDigest.getInstance( "SHA-224");
      byte[] bSHA224 = messageDigest224.digest( "hello word".getBytes());

But I get error

      MessageDigest SHA-224 implementation not found
      java.security.NoSuchAlgorithmException: MessageDigest SHA-224 implementation not found

SHA-512, SHA-1 algorithm work fine.

Please get me link to analog SHA224 in Java. Please any ideas.

标签: java android sha