use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQDSAPrivateKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQDSAKeyFactory keyFactory = new IQDSAKeyFactory();
IQDSAPrivateKeySpec keySpec = (IQDSAPrivateKeySpec) keyFactory.getKeySpec(key, IQDSAPrivateKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_a, "" + keySpec.getA()));
paramElements.addAll(getParameters(keySpec));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQDSAPrivateKeyContentProvider method getParameters.
private List<TableEntry> getParameters(IQDSAPrivateKeySpec keySpec) {
IQDSAParameterSpec params = (IQDSAParameterSpec) keySpec.getParams();
List<TableEntry> paramElements = new ArrayList<TableEntry>();
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_discriminant, "" + params.getDiscriminant()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_gamma, "" + params.getGamma()));
return paramElements;
}
use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQDSAPublicKeyContentProvider method getParameters.
private List<TableEntry> getParameters(IQDSAPublicKeySpec keySpec) {
IQDSAParameterSpec params = (IQDSAParameterSpec) keySpec.getParams();
List<TableEntry> paramElements = new ArrayList<TableEntry>();
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_discriminant, "" + params.getDiscriminant()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_gamma, "" + params.getGamma()));
return paramElements;
}
use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQDSAPublicKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQDSAKeyFactory keyFactory = new IQDSAKeyFactory();
IQDSAPublicKeySpec keySpec = (IQDSAPublicKeySpec) keyFactory.getKeySpec(key, IQDSAPublicKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_alpha, "" + keySpec.getAlpha()));
paramElements.addAll(getParameters(keySpec));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQGQPrivateKeyContentProvider method getParameters.
private List<TableEntry> getParameters(IQGQPrivateKeySpec keySpec) {
IQGQParameterSpec params = (IQGQParameterSpec) keySpec.getParams();
List<TableEntry> paramElements = new ArrayList<TableEntry>();
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_discriminant, "" + params.getDiscriminant()));
return paramElements;
}
Aggregations