mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 12:52:07 +01:00
Add get{,Un}HashedNotationData(sig, notationName) to SignatureSubpacketUtils
This commit is contained in:
parent
bedfef49fe
commit
f7525dde65
1 changed files with 22 additions and 0 deletions
|
@ -331,6 +331,17 @@ public class SignatureSubpacketsUtil {
|
|||
return Arrays.asList(notations);
|
||||
}
|
||||
|
||||
public static List<NotationData> getHashedNotationData(PGPSignature signature, String notationName) {
|
||||
List<NotationData> allNotations = getHashedNotationData(signature);
|
||||
List<NotationData> withName = new ArrayList<>();
|
||||
for (NotationData data : allNotations) {
|
||||
if (data.getNotationName().equals(notationName)) {
|
||||
withName.add(data);
|
||||
}
|
||||
}
|
||||
return withName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the notation data subpackets from the signatures unhashed area.
|
||||
*
|
||||
|
@ -342,6 +353,17 @@ public class SignatureSubpacketsUtil {
|
|||
return Arrays.asList(notations);
|
||||
}
|
||||
|
||||
public static List<NotationData> getUnhashedNotationData(PGPSignature signature, String notationName) {
|
||||
List<NotationData> allNotations = getUnhashedNotationData(signature);
|
||||
List<NotationData> withName = new ArrayList<>();
|
||||
for (NotationData data : allNotations) {
|
||||
if (data.getNotationName().equals(notationName)) {
|
||||
withName.add(data);
|
||||
}
|
||||
}
|
||||
return withName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the revocation key subpacket from the signatures hashed area.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue