java.security.KeyFactorySpi Java Examples
The following examples show how to use
java.security.KeyFactorySpi.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: KeyFactorySpiTest.java From j2objc with Apache License 2.0 | 6 votes |
/** * Test for <code>KeyFactorySpi</code> constructor * Assertion: constructs KeyFactorySpi */ public void testKeyFactorySpi() { MyKeyFactorySpi keyFSpi = new MyKeyFactorySpi(); assertTrue(keyFSpi instanceof KeyFactorySpi); KeySpec ks = new MyKeySpec(); KeySpec kss = new MyKeySpec(); try { keyFSpi.engineGeneratePrivate(ks); keyFSpi.engineGeneratePublic(ks); keyFSpi.engineGetKeySpec(null, java.lang.Class.class); keyFSpi.engineTranslateKey(null); } catch (Exception e) { fail("Unexpected exception"); } }
Example #2
Source File: BouncyCastleKeyFactoryProvider.java From armeria with Apache License 2.0 | 4 votes |
private void addKeyFactories() { addKeyFactory(org.bouncycastle.jcajce.provider.asymmetric.rsa.KeyFactorySpi.class, "RSA"); addKeyFactory(org.bouncycastle.jcajce.provider.asymmetric.dsa.KeyFactorySpi.class, "DSA"); addKeyFactory(EC.class, "EC"); }
Example #3
Source File: BouncyCastleKeyFactoryProvider.java From armeria with Apache License 2.0 | 4 votes |
private void addKeyFactory(Class<? extends KeyFactorySpi> type, String name) { addAlgorithm("KeyFactory." + name, type.getName()); }