I am trying to generate a signature using ECDSA with SHA256 in Bouncy Castle as follows,
Signature s_oSignature = Signature.getInstance("SHA256withECDSA",
BouncyCastleProvider.PROVIDER_NAME);
but step 3 throws "java.security.NoSuchAlgorithmException: no such algorithm: SHA256withECDSA for provider BC".
But same "SHA256withECDSA" thing when replaced with "SHA1withECDSA" prceeds without any exception.
How is it possible? I am using "bcprov-jdk14-121.jar".
Can any one please help me as I have been struggling for a long time?
I've never encountered this problem but here are a few things you can try.
This problem is extremely odd as SHA256withECDSA is clearly listed in the specifications so it only leaves the option to try all possible options no matter how unlikely they are to help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With