000011559 - java.security.NoSuchAlgorithmException: SHA-256 MessageDigest not available

Document created by RSA Customer Support Employee on Jun 14, 2016Last modified by RSA Customer Support Employee on Apr 21, 2017
Version 2Show Document
  • View in full screen mode

Article Content

Article Number000011559
Applies ToRSA Key Manager Mainframe Client
IBM JVM 1.5
Issuejava.security.NoSuchAlgorithmException: SHA-256 MessageDigest not available
0    [main] DEBUG com.custom.security.crypto.CryptoService  - Pluggable provider is initiated.
44   [main] ERROR com.custom.security.crypto.SecureHashAlgorithmProvider  - SHA-256 MessageDigest not available
java.security.NoSuchAlgorithmException: SHA-256 MessageDigest not available
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:158)
        at java.security.Security.getImpl(Security.java:691)
        at java.security.MessageDigest.getInstance(MessageDigest.java:146)
        at com.custom.security.crypto.SecureHashAlgorithmProvider.<init>(SecureHashAlgorithmProvider.java:67)
        at com.custom.security.crypto.CryptoProvider.digest(CryptoProvider.java:55)
        at com.custom.security.crypto.CryptoService.digest(CryptoService.java:74)
        at samples.CryptoSample.main(CryptoSample.java:26)
SHA message digest initiation failed
Resolution

Adding the following to the java command line typically solves this issue:

-Djava.ext.dirs=*/jdk/jre/lib/ext

Legacy Article IDa51735

Attachments

    Outcomes