Package org.pgpainless.key.info
Class KeyAccessor
- java.lang.Object
-
- org.pgpainless.key.info.KeyAccessor
-
- Direct Known Subclasses:
KeyAccessor.ViaKeyId
,KeyAccessor.ViaUserId
public abstract class KeyAccessor extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KeyAccessor.ViaKeyId
Address the key via key-id.static class
KeyAccessor.ViaUserId
Address the key via a user-id (e.g.
-
Field Summary
Fields Modifier and Type Field Description protected KeyRingInfo
info
protected SubkeyIdentifier
key
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Set<CompressionAlgorithm>
getPreferredCompressionAlgorithms()
Return preferred compression algorithms.Set<HashAlgorithm>
getPreferredHashAlgorithms()
Return preferred hash algorithms.Set<SymmetricKeyAlgorithm>
getPreferredSymmetricKeyAlgorithms()
Return preferred symmetric key encryption algorithms.abstract org.bouncycastle.openpgp.PGPSignature
getSignatureWithPreferences()
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.
-
-
-
Field Detail
-
info
protected final KeyRingInfo info
-
key
protected final SubkeyIdentifier key
-
-
Method Detail
-
getSignatureWithPreferences
@Nonnull public abstract org.bouncycastle.openpgp.PGPSignature getSignatureWithPreferences()
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.- Returns:
- signature
-
getPreferredSymmetricKeyAlgorithms
public Set<SymmetricKeyAlgorithm> getPreferredSymmetricKeyAlgorithms()
Return preferred symmetric key encryption algorithms.- Returns:
- preferred symmetric algorithms
-
getPreferredHashAlgorithms
public Set<HashAlgorithm> getPreferredHashAlgorithms()
Return preferred hash algorithms.- Returns:
- preferred hash algorithms
-
getPreferredCompressionAlgorithms
public Set<CompressionAlgorithm> getPreferredCompressionAlgorithms()
Return preferred compression algorithms.- Returns:
- preferred compression algorithms
-
-