Class KeyInfo

    • Constructor Summary

      Constructors 
      Constructor Description
      KeyInfo​(org.bouncycastle.openpgp.PGPPublicKey publicKey)  
      KeyInfo​(org.bouncycastle.openpgp.PGPSecretKey secretKey)  
    • Constructor Detail

      • KeyInfo

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

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

      • 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.