Package org.pgpainless.key.info
Class KeyAccessor.ViaKeyId
java.lang.Object
org.pgpainless.key.info.KeyAccessor
org.pgpainless.key.info.KeyAccessor.ViaKeyId
- Enclosing class:
KeyAccessor
Address the key via key-id.
In this case we are sourcing preferred algorithms from the keys direct-key signature first.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.pgpainless.key.info.KeyAccessor
KeyAccessor.SubKey, KeyAccessor.ViaKeyId, KeyAccessor.ViaUserId
-
Field Summary
Fields inherited from class org.pgpainless.key.info.KeyAccessor
info, key
-
Constructor Summary
ConstructorsConstructorDescriptionViaKeyId
(KeyRingInfo info, SubkeyIdentifier key) Address the key via key-id. -
Method Summary
Modifier and TypeMethodDescriptionorg.bouncycastle.openpgp.PGPSignature
Depending on the way we address the key (key-id or user-id), return the respectivePGPSignature
which contains the algorithm preferences we are going to use.Methods inherited from class org.pgpainless.key.info.KeyAccessor
getPreferredCompressionAlgorithms, getPreferredHashAlgorithms, getPreferredSymmetricKeyAlgorithms
-
Constructor Details
-
ViaKeyId
Address the key via key-id.- Parameters:
info
- info about the key at a given datekey
- key-id
-
-
Method Details
-
getSignatureWithPreferences
@Nonnull public org.bouncycastle.openpgp.PGPSignature getSignatureWithPreferences()Description copied from class:KeyAccessor
Depending on the way we address the key (key-id or user-id), return the respectivePGPSignature
which contains the algorithm preferences we are going to use.If we address a key via its user-id, we want to rely on the algorithm preferences in the user-id certification, while we would instead rely on those in the direct-key signature if we'd address the key by key-id.
- Specified by:
getSignatureWithPreferences
in classKeyAccessor
- Returns:
- signature
-