mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
Add convenience method to delete userIds from the primary key
This commit is contained in:
parent
449881bd8d
commit
138ea0d572
2 changed files with 12 additions and 0 deletions
|
@ -147,6 +147,12 @@ public class SecretKeyRingEditor implements SecretKeyRingEditorInterface {
|
||||||
return deleteUserId(publicKey.getKeyID(), userId, protector);
|
return deleteUserId(publicKey.getKeyID(), userId, protector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SecretKeyRingEditorInterface deleteUserIds(UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector) {
|
||||||
|
PGPPublicKey publicKey = secretKeyRing.getPublicKey();
|
||||||
|
return deleteUserIds(publicKey.getKeyID(), selectionStrategy, secretKeyRingProtector);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SecretKeyRingEditorInterface deleteUserIds(long keyId, UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector) {
|
public SecretKeyRingEditorInterface deleteUserIds(long keyId, UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector) {
|
||||||
List<PGPPublicKey> publicKeys = new ArrayList<>();
|
List<PGPPublicKey> publicKeys = new ArrayList<>();
|
||||||
|
|
|
@ -80,6 +80,12 @@ public interface SecretKeyRingEditorInterface {
|
||||||
return deleteUserIds(keyId, UserIdSelectionStrategy.exactMatch(userId), secretKeyRingProtector);
|
return deleteUserIds(keyId, UserIdSelectionStrategy.exactMatch(userId), secretKeyRingProtector);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SecretKeyRingEditorInterface deleteUserIds(UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector);
|
||||||
|
|
||||||
|
default SecretKeyRingEditorInterface deleteUserIds(OpenPgpV4Fingerprint fingerprint, UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector) {
|
||||||
|
return deleteUserIds(fingerprint.getKeyId(), selectionStrategy, secretKeyRingProtector);
|
||||||
|
}
|
||||||
|
|
||||||
SecretKeyRingEditorInterface deleteUserIds(long keyId, UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector);
|
SecretKeyRingEditorInterface deleteUserIds(long keyId, UserIdSelectionStrategy selectionStrategy, SecretKeyRingProtector secretKeyRingProtector);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue