Search in sources :

Example 1 with ECSecretKey

use of de.flexiprovider.ec.keys.ECSecretKey in project core by jcryptool.

the class ECSecretKeyContentProvider method getAlgorithmElements.

@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        ECSecretKey key = (ECSecretKey) inputElement;
        if (key == null)
            return null;
        // $NON-NLS-2$
        paramElements.add(new TableEntry(Messages.ContentProvider_s, "" + key.getS()));
    } catch (ClassCastException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) ArrayList(java.util.ArrayList) ECSecretKey(de.flexiprovider.ec.keys.ECSecretKey)

Example 2 with ECSecretKey

use of de.flexiprovider.ec.keys.ECSecretKey in project core by jcryptool.

the class PBESecretKeyContentProvider method getAlgorithmElements.

@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
    List<TableEntry> paramElements = new ArrayList<TableEntry>();
    try {
        ECSecretKey key = (ECSecretKey) inputElement;
        if (key == null)
            return null;
        paramElements.add(new TableEntry(Messages.ContentProvider_s, key.getS().toString()));
    } catch (ClassCastException e) {
        return null;
    }
    return paramElements;
}
Also used : TableEntry(org.jcryptool.crypto.keystore.ui.dialogs.TableEntry) ArrayList(java.util.ArrayList) ECSecretKey(de.flexiprovider.ec.keys.ECSecretKey)

Aggregations

ECSecretKey (de.flexiprovider.ec.keys.ECSecretKey)2 ArrayList (java.util.ArrayList)2 TableEntry (org.jcryptool.crypto.keystore.ui.dialogs.TableEntry)2