Class KeyAccessor.ViaUserId

  • Enclosing class:
    KeyAccessor

    public static class KeyAccessor.ViaUserId
    extends KeyAccessor
    Address the key via a user-id (eg "Alice <[email protected]>). In this case we are sourcing preferred algorithms from the user-id certification first.
    • Constructor Detail

      • ViaUserId

        public ViaUserId​(KeyRingInfo info,
                         SubkeyIdentifier key,
                         java.lang.String userId)
        Access a key via user-id.
        Parameters:
        info - info about a key at a given date
        key - id of the subkey
        userId - user-id
    • Method Detail

      • 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 respective PGPSignature 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 class KeyAccessor
        Returns:
        signature