mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-25 22:02:05 +01:00
parent
a8ab93a49a
commit
15f6cc70b1
1 changed files with 15 additions and 0 deletions
|
@ -92,6 +92,21 @@ public class MessageMetadata {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return a list containing all recipient keyIDs.
|
||||||
|
*
|
||||||
|
* @return list of recipients
|
||||||
|
*/
|
||||||
|
public List<Long> getRecipientKeyIds() {
|
||||||
|
List<Long> keyIds = new ArrayList<>();
|
||||||
|
Iterator<EncryptedData> encLayers = getEncryptionLayers();
|
||||||
|
while (encLayers.hasNext()) {
|
||||||
|
EncryptedData layer = encLayers.next();
|
||||||
|
keyIds.addAll(layer.getRecipients());
|
||||||
|
}
|
||||||
|
return keyIds;
|
||||||
|
}
|
||||||
|
|
||||||
public @Nonnull Iterator<EncryptedData> getEncryptionLayers() {
|
public @Nonnull Iterator<EncryptedData> getEncryptionLayers() {
|
||||||
return new LayerIterator<EncryptedData>(message) {
|
return new LayerIterator<EncryptedData>(message) {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue