Class KeyInfo

java.lang.Object
org.pgpainless.key.info.KeyInfo

public class KeyInfo extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyInfo(org.bouncycastle.openpgp.PGPPublicKey publicKey)
     
    KeyInfo(org.bouncycastle.openpgp.PGPSecretKey secretKey)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    static String
    getCurveName(org.bouncycastle.bcpg.ECPublicBCPGKey key)
     
    static String
    getCurveName(org.bouncycastle.openpgp.PGPPublicKey publicKey)
     
    boolean
    Returns indication that a contained secret key has S2K of a type GNU_DUMMY_S2K.
    static boolean
    hasDummyS2K(org.bouncycastle.openpgp.PGPSecretKey secretKey)
    Returns indication that a secret key has S2K of a type GNU_DUMMY_S2K.
    boolean
    Returns indication that a contained secret key is not encrypted.
    static boolean
    isDecrypted(org.bouncycastle.openpgp.PGPSecretKey secretKey)
    Returns indication that a secret key is not encrypted.
    boolean
    Returns indication that a contained secret key is encrypted.
    static boolean
    isEncrypted(org.bouncycastle.openpgp.PGPSecretKey secretKey)
    Returns indication that a secret key is encrypted.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KeyInfo

      public KeyInfo(org.bouncycastle.openpgp.PGPSecretKey secretKey)
    • KeyInfo

      public KeyInfo(org.bouncycastle.openpgp.PGPPublicKey publicKey)
  • Method Details

    • getCurveName

      public String getCurveName()
    • isEncrypted

      public boolean isEncrypted()
      Returns indication that a contained secret key is encrypted.
      Returns:
      true if secret key is encrypted, false if secret key is not encrypted or there is public key only.
    • isDecrypted

      public boolean isDecrypted()
      Returns indication that a contained secret key is not encrypted.
      Returns:
      true if secret key is not encrypted or there is public key only, false if secret key is encrypted.
    • hasDummyS2K

      public boolean hasDummyS2K()
      Returns indication that a contained secret key has S2K of a type GNU_DUMMY_S2K.
      Returns:
      true if secret key has S2K of a type GNU_DUMMY_S2K, false if there is public key only, or S2K on the secret key is absent or not of a type GNU_DUMMY_S2K.
    • getCurveName

      public static String getCurveName(org.bouncycastle.openpgp.PGPPublicKey publicKey)
    • getCurveName

      public static String getCurveName(org.bouncycastle.bcpg.ECPublicBCPGKey key)
    • isEncrypted

      public static boolean isEncrypted(org.bouncycastle.openpgp.PGPSecretKey secretKey)
      Returns indication that a secret key is encrypted.
      Parameters:
      secretKey - A secret key to examine.
      Returns:
      true if secret key is encrypted, false otherwise.
    • isDecrypted

      public static boolean isDecrypted(org.bouncycastle.openpgp.PGPSecretKey secretKey)
      Returns indication that a secret key is not encrypted.
      Parameters:
      secretKey - A secret key to examine.
      Returns:
      true if secret key is encrypted, false otherwise.
    • hasDummyS2K

      public static boolean hasDummyS2K(org.bouncycastle.openpgp.PGPSecretKey secretKey)
      Returns indication that a secret key has S2K of a type GNU_DUMMY_S2K.
      Parameters:
      secretKey - A secret key to examine.
      Returns:
      true if secret key has S2K of a type GNU_DUMMY_S2K, false otherwise.