List of usage examples for org.bouncycastle.openpgp PGPSignature getKeyAlgorithm
public int getKeyAlgorithm()
From source file:org.pgptool.gui.encryption.implpgp.KeyFilesOperationsPgpImpl.java
License:Open Source License
@SuppressWarnings("rawtypes") private static String resolveAlgorithm(PGPPublicKey key) throws PGPException { for (Iterator iter = key.getSignatures(); iter.hasNext();) { PGPSignature sig = (PGPSignature) iter.next(); return PGPUtil.getSignatureName(sig.getKeyAlgorithm(), sig.getHashAlgorithm()); }//from ww w . j a v a 2s. com return null; }