|
|
@@ -246,9 +246,16 @@ public class DecryptExecutor {
|
|
|
*/
|
|
|
private static boolean checkPwdConsistency(String projectPath, String classWinterInfoDir, char[] password) {
|
|
|
// 查看加密时,用户是否主动输入了密码
|
|
|
+ byte[] userIfInputPwdWhileEncryptFlag = IOUtil.readFileFromWorkbenchRoot(new File(projectPath),
|
|
|
+ classWinterInfoDir + Constant.USER_IF_INPUT_PWD_SIMPLE_NAME);
|
|
|
+ if (userIfInputPwdWhileEncryptFlag == null) {
|
|
|
+ Logger.debug(DecryptExecutor.class, "\n\tworkbenchRoot -> "
|
|
|
+ + projectPath + "\n\t relativeFilePath -> " + (classWinterInfoDir + Constant.USER_IF_INPUT_PWD_SIMPLE_NAME)
|
|
|
+ );
|
|
|
+ throw new ClassWinterException("Not found content of 'userIfInputPwd.winter'.");
|
|
|
+ }
|
|
|
boolean userIfInputPwdWhileEncrypt = Boolean.parseBoolean(
|
|
|
- new String(IOUtil.readFileFromWorkbenchRoot(new File(projectPath),
|
|
|
- classWinterInfoDir + Constant.USER_IF_INPUT_PWD_SIMPLE_NAME))
|
|
|
+ new String(userIfInputPwdWhileEncryptFlag)
|
|
|
);
|
|
|
// 解密时,用户是否主动输入了密码
|
|
|
boolean userIfInputPwdWhileDecrypt = !StrUtil.isEmpty(password);
|