1
0
Fork 0
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:
Paul Schaub 2021-06-10 13:35:09 +02:00
parent 9b9064beae
commit bedfef49fe
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -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());
}
}