use of de.flexiprovider.api.exceptions.InvalidKeySpecException 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;
}
use of de.flexiprovider.api.exceptions.InvalidKeySpecException 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 de.flexiprovider.api.exceptions.InvalidKeySpecException 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 de.flexiprovider.api.exceptions.InvalidKeySpecException in project core by jcryptool.
the class IQGQPrivateKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQGQKeyFactory keyFactory = new IQGQKeyFactory();
IQGQPrivateKeySpec keySpec = (IQGQPrivateKeySpec) keyFactory.getKeySpec(key, IQGQPrivateKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_exponent, "" + keySpec.getExponent()));
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_theta, "" + keySpec.getTheta()));
paramElements.addAll(getParameters(keySpec));
} catch (ClassCastException e) {
return null;
} catch (InvalidKeySpecException e) {
return null;
}
return paramElements;
}
use of de.flexiprovider.api.exceptions.InvalidKeySpecException in project core by jcryptool.
the class IQGQPublicKeyContentProvider method getKeySpecElements.
@Override
protected List<TableEntry> getKeySpecElements(Key key) {
List<TableEntry> paramElements = new ArrayList<TableEntry>();
try {
IQGQKeyFactory keyFactory = new IQGQKeyFactory();
IQGQPublicKeySpec keySpec = (IQGQPublicKeySpec) keyFactory.getKeySpec(key, IQGQPublicKeySpec.class);
if (keySpec == null)
return null;
// $NON-NLS-2$
paramElements.add(new TableEntry(Messages.ContentProvider_exponent, "" + keySpec.getExponent()));
// $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;
}
Aggregations