Klasse OpenPgpKeyAttributeUtil

java.lang.Object
org.pgpainless.key.util.OpenPgpKeyAttributeUtil

public final class OpenPgpKeyAttributeUtil extends Object
  • Methodendetails

    • getPreferredHashAlgorithms

      public static List<org.pgpainless.algorithm.HashAlgorithm> getPreferredHashAlgorithms(org.bouncycastle.openpgp.PGPPublicKey publicKey)
    • guessPreferredHashAlgorithms

      public static List<org.pgpainless.algorithm.HashAlgorithm> guessPreferredHashAlgorithms(org.bouncycastle.openpgp.PGPPublicKey publicKey)
      Return the hash algorithm that was used in the latest self signature.
      Parameter:
      publicKey - public key
      Gibt zurück:
      list of hash algorithm
    • getOrGuessPreferredHashAlgorithms

      public static Set<org.pgpainless.algorithm.HashAlgorithm> getOrGuessPreferredHashAlgorithms(org.bouncycastle.openpgp.PGPPublicKey publicKey)
      Try to extract hash algorithm preferences from self signatures. If no self-signature containing hash algorithm preferences is found, try to derive a hash algorithm preference by inspecting the hash algorithm used by existing self-signatures.
      Parameter:
      publicKey - key
      Gibt zurück:
      hash algorithm preferences (might be empty!)