KeyFactory for RSASSA-PSS
"extern.Markus Ganss" <[email protected]>
| Newsgroups | gmane.comp.encryption.bouncy-castle.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I try to get a KeyFactory for the RSASSA-PSS Algorithm with registered BouncyCastleProvider, but get a NonSuchAlgorithmException:
java.security.NoSuchAlgorithmException: no such algorithm: PSS for provider BC
I am using these maven dependencies:
<dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk15on</artifactId> <version>1.60</version> </dependency>
<dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcpkix-jdk15on</artifactId> <version>1.60</version> </dependency>
And my java code is quite simple:
public void testRegisterBouncyCastleProvider() {
System.out.println("Test BouncyCastleProvider started");
BouncyCastleProvider provider = new BouncyCastleProvider();
Security.addProvider(provider);
try {
KeyFactory factory = KeyFactory.getInstance("PSS",provider);
assertNotNull("KeyFactory is null",factory);
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
fail("No Provider");
}
}
I also tried with:
KeyFactory factory = KeyFactory.getInstance("RSASSA-PSS",provider);
Any ideas, how i can get a KeyFactory for RSASSA-PSS?
Thanks for help,
Best Regards
Markus