Search in sources :

Example 1 with SSVElGamalPublicKeySpec

use of de.flexiprovider.core.elgamal.semanticallysecure.SSVElGamalPublicKeySpec in project core by jcryptool.

the class SSVElGamalPublicKeyContentProvider method getKeySpecElements.

@Override
protected List<TableEntry> getKeySpecElements(Key key) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        SSVElGamalKeyFactory keyFactory = new SSVElGamalKeyFactory();
        SSVElGamalPublicKeySpec keySpec = (SSVElGamalPublicKeySpec) keyFactory.getKeySpec(key, SSVElGamalPublicKeySpec.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) SSVElGamalPublicKeySpec(de.flexiprovider.core.elgamal.semanticallysecure.SSVElGamalPublicKeySpec) SSVElGamalKeyFactory(de.flexiprovider.core.elgamal.semanticallysecure.SSVElGamalKeyFactory) ArrayList(java.util.ArrayList) InvalidKeySpecException(de.flexiprovider.api.exceptions.InvalidKeySpecException)

Aggregations

InvalidKeySpecException (de.flexiprovider.api.exceptions.InvalidKeySpecException)1 SSVElGamalKeyFactory (de.flexiprovider.core.elgamal.semanticallysecure.SSVElGamalKeyFactory)1 SSVElGamalPublicKeySpec (de.flexiprovider.core.elgamal.semanticallysecure.SSVElGamalPublicKeySpec)1 ArrayList (java.util.ArrayList)1 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)1