Package org.pgpainless.key.info
Class KeyInfo
- java.lang.Object
-
- org.pgpainless.key.info.KeyInfo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCurveName()
static String
getCurveName(org.bouncycastle.bcpg.ECPublicBCPGKey key)
static String
getCurveName(org.bouncycastle.openpgp.PGPPublicKey publicKey)
boolean
hasDummyS2K()
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
isDecrypted()
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
isEncrypted()
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.
-
-
-
Method Detail
-
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.
-
-