use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQGQPublicKeyContentProvider method getParameters.
private List<TableEntry> getParameters(IQGQPublicKeySpec 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;
}
use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQRDSAPrivateKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQRDSAKeyFactory keyFactory = new IQRDSAKeyFactory();
IQRDSAPrivateKeySpec keySpec = (IQRDSAPrivateKeySpec) keyFactory.getKeySpec(key, IQRDSAPrivateKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_a, "" + keySpec.getA()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_alpha, "" + keySpec.getAlpha()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_gamma, "" + keySpec.getGamma()));
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 IQRDSAPrivateKeyContentProvider method getParameters.
private List<TableEntry> getParameters(IQRDSAPrivateKeySpec keySpec) {
IQRDSAParameterSpec params = (IQRDSAParameterSpec) 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_modulus, "" + params.getModulus()));
return paramElements;
}
use of org.jcryptool.crypto.keystore.ui.dialogs.TableEntry in project core by jcryptool.
the class IQRDSAPublicKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQRDSAKeyFactory keyFactory = new IQRDSAKeyFactory();
IQRDSAPublicKeySpec keySpec = (IQRDSAPublicKeySpec) keyFactory.getKeySpec(key, IQRDSAPublicKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_alpha, "" + keySpec.getAlpha()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_gamma, "" + keySpec.getGamma()));
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 LMOTSPrivateKeyContentProvider method getAlgorithmElements.
@Override
protected List<TableEntry> getAlgorithmElements(Object inputElement) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
LMOTSPrivateKey key = (LMOTSPrivateKey) inputElement;
if (key == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_k, "" + Arrays.toString(key.getK().toArray())));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_l, "" + Arrays.toString(key.getL().toArray())));
} catch (ClassCastException e) {
return null;
}
return paramElements;
}
Aggregations