mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 12:52:07 +01:00
Add getSignatureDigestPrefix utility method to SignatureUtils
This commit is contained in:
parent
9b9064beae
commit
bedfef49fe
1 changed files with 5 additions and 0 deletions
|
@ -32,6 +32,7 @@ import org.bouncycastle.openpgp.PGPSignature;
|
|||
import org.bouncycastle.openpgp.PGPSignatureGenerator;
|
||||
import org.bouncycastle.openpgp.PGPSignatureList;
|
||||
import org.bouncycastle.openpgp.operator.PGPContentSignerBuilder;
|
||||
import org.bouncycastle.util.encoders.Hex;
|
||||
import org.pgpainless.PGPainless;
|
||||
import org.pgpainless.algorithm.HashAlgorithm;
|
||||
import org.pgpainless.algorithm.SignatureType;
|
||||
|
@ -195,4 +196,8 @@ public class SignatureUtils {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getSignatureDigestPrefix(PGPSignature signature) {
|
||||
return Hex.toHexString(signature.getDigestPrefix());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue