mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-12 23:31:08 +01: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,
|
* @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.
|
* or S2K on the secret key is absent or not of a type GNU_DUMMY_S2K.
|
||||||
*/
|
*/
|
||||||
public boolean hasGnuDummyS2K() {
|
public boolean hasDummyS2K() {
|
||||||
return secretKey != null && hasGnuDummyS2K(secretKey);
|
return secretKey != null && hasDummyS2K(secretKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getCurveName(PGPPublicKey publicKey) {
|
public static String getCurveName(PGPPublicKey publicKey) {
|
||||||
|
|
@ -125,7 +125,7 @@ public class KeyInfo {
|
||||||
* @param secretKey A secret key to examine.
|
* @param secretKey A secret key to examine.
|
||||||
* @return true if secret key has S2K of a type GNU_DUMMY_S2K, false otherwise.
|
* @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();
|
final S2K s2k = secretKey.getS2K();
|
||||||
return s2k != null && s2k.getType() == S2K.GNU_DUMMY_S2K;
|
return s2k != null && s2k.getType() == S2K.GNU_DUMMY_S2K;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ public class KeyRingInfo {
|
||||||
public boolean isFullyDecrypted() {
|
public boolean isFullyDecrypted() {
|
||||||
if (isSecretKey()) {
|
if (isSecretKey()) {
|
||||||
for (PGPSecretKey secretKey : getSecretKeys()) {
|
for (PGPSecretKey secretKey : getSecretKeys()) {
|
||||||
if (!KeyInfo.hasGnuDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
|
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -327,7 +327,7 @@ public class KeyRingInfo {
|
||||||
public boolean isFullyEncrypted() {
|
public boolean isFullyEncrypted() {
|
||||||
if (isSecretKey()) {
|
if (isSecretKey()) {
|
||||||
for (PGPSecretKey secretKey : getSecretKeys()) {
|
for (PGPSecretKey secretKey : getSecretKeys()) {
|
||||||
if (!KeyInfo.hasGnuDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
|
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue