mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-12 03:39:39 +02:00
better method names
This commit is contained in:
parent
3c32bf607b
commit
71e0886916
2 changed files with 5 additions and 5 deletions
|
@ -69,8 +69,8 @@ public class KeyInfo {
|
|||
* @return 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.
|
||||
*/
|
||||
public boolean hasGnuDummyS2K() {
|
||||
return secretKey != null && hasGnuDummyS2K(secretKey);
|
||||
public boolean hasDummyS2K() {
|
||||
return secretKey != null && hasDummyS2K(secretKey);
|
||||
}
|
||||
|
||||
public static String getCurveName(PGPPublicKey publicKey) {
|
||||
|
@ -125,7 +125,7 @@ public class KeyInfo {
|
|||
* @param secretKey A secret key to examine.
|
||||
* @return true if secret key has S2K of a type GNU_DUMMY_S2K, false otherwise.
|
||||
*/
|
||||
public static boolean hasGnuDummyS2K(PGPSecretKey secretKey) {
|
||||
public static boolean hasDummyS2K(PGPSecretKey secretKey) {
|
||||
final S2K s2k = secretKey.getS2K();
|
||||
return s2k != null && s2k.getType() == S2K.GNU_DUMMY_S2K;
|
||||
}
|
||||
|
|
|
@ -308,7 +308,7 @@ public class KeyRingInfo {
|
|||
public boolean isFullyDecrypted() {
|
||||
if (isSecretKey()) {
|
||||
for (PGPSecretKey secretKey : getSecretKeys()) {
|
||||
if (!KeyInfo.hasGnuDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
|
||||
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ public class KeyRingInfo {
|
|||
public boolean isFullyEncrypted() {
|
||||
if (isSecretKey()) {
|
||||
for (PGPSecretKey secretKey : getSecretKeys()) {
|
||||
if (!KeyInfo.hasGnuDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
|
||||
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue