Search in sources :

Example 1 with DSAKeyFactory

use of de.flexiprovider.core.dsa.DSAKeyFactory in project core by jcryptool.

the class DSAPrivateKeyContentProvider method getKeySpecElements.

@Override
protected List<TableEntry> getKeySpecElements(Key key) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        DSAKeyFactory keyFactory = new DSAKeyFactory();
        DSAPrivateKeySpec keySpec = (DSAPrivateKeySpec) keyFactory.getKeySpec(key, DSAPrivateKeySpec.class);
        if (keySpec == null)
            return null;
    } catch (ClassCastException e) {
        return null;
    } catch (InvalidKeySpecException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) DSAKeyFactory(de.flexiprovider.core.dsa.DSAKeyFactory) DSAPrivateKeySpec(de.flexiprovider.core.dsa.DSAPrivateKeySpec) ArrayList(java.util.ArrayList) InvalidKeySpecException(de.flexiprovider.api.exceptions.InvalidKeySpecException)

Aggregations

InvalidKeySpecException (de.flexiprovider.api.exceptions.InvalidKeySpecException)1 DSAKeyFactory (de.flexiprovider.core.dsa.DSAKeyFactory)1 DSAPrivateKeySpec (de.flexiprovider.core.dsa.DSAPrivateKeySpec)1 ArrayList (java.util.ArrayList)1 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)1