mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-26 22:32:07 +01:00
Revert if-conditions to reduce indentation level
This commit is contained in:
parent
e13a2fce73
commit
9395fa80a2
1 changed files with 14 additions and 13 deletions
|
@ -697,11 +697,12 @@ public class KeyRingInfo {
|
||||||
* @return true if all secret keys are unencrypted.
|
* @return true if all secret keys are unencrypted.
|
||||||
*/
|
*/
|
||||||
public boolean isFullyDecrypted() {
|
public boolean isFullyDecrypted() {
|
||||||
if (isSecretKey()) {
|
if (!isSecretKey()) {
|
||||||
for (PGPSecretKey secretKey : getSecretKeys()) {
|
return true;
|
||||||
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
|
}
|
||||||
return false;
|
for (PGPSecretKey secretKey : getSecretKeys()) {
|
||||||
}
|
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
@ -716,15 +717,15 @@ public class KeyRingInfo {
|
||||||
* @return true if all secret keys are encrypted.
|
* @return true if all secret keys are encrypted.
|
||||||
*/
|
*/
|
||||||
public boolean isFullyEncrypted() {
|
public boolean isFullyEncrypted() {
|
||||||
if (isSecretKey()) {
|
if (!isSecretKey()) {
|
||||||
for (PGPSecretKey secretKey : getSecretKeys()) {
|
return false;
|
||||||
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
for (PGPSecretKey secretKey : getSecretKeys()) {
|
||||||
|
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue