Package org.pgpainless.key.info
Class KeyInfo
java.lang.Object
org.pgpainless.key.info.KeyInfo
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Constructor Details
-
KeyInfo
public KeyInfo(org.bouncycastle.openpgp.PGPSecretKey secretKey) -
KeyInfo
public KeyInfo(org.bouncycastle.openpgp.PGPPublicKey publicKey)
-
-
Method Details
-
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
-
getCurveName
-
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.
-