List of usage examples for org.bouncycastle.openpgp PGPUtil getSignatureName
public static String getSignatureName(int keyAlgorithm, int hashAlgorithm) throws PGPException
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 w w w . java2s . c o m*/ return null; }