摘要:
一、问题的引出目的:设计一个加密的工具类。写法一:【单例模式】public class CipherUtils { private List key; private static CipherUtils instance; private CipherUtils(String... args){ // TODO 比较复杂的初始化KEY的过程 } public static boolean initInstance(String... args){ instance = new CipherUtils(args); return true; } public static Cipher... 阅读全文