aes
huanghongfa
2020-12-22 700552f39b3ee1f7aaa328355f376da94f212e29
aes
5个文件已修改
65 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AES.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/controller/BaseController.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/utlis/AES.class 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -27,7 +27,6 @@
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/controller/BaseController.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/controller/BaseController.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/utlis/AES.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/utlis/AES.java" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/controller/BaseController.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/controller/BaseController.class" afterDir="false" />
      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/utlis/AES.class" beforeDir="false" />
    </list>
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -377,7 +376,7 @@
      <workItem from="1608371107059" duration="646000" />
      <workItem from="1608371917868" duration="79000" />
      <workItem from="1608379508016" duration="46000" />
      <workItem from="1608531425658" duration="44039000" />
      <workItem from="1608531425658" duration="45512000" />
    </task>
    <servers />
  </component>
@@ -429,54 +428,54 @@
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1606197830966" />
    <state width="1493" height="321" key="GridCell.Tab.0.bottom" timestamp="1608633761378">
    <state width="1493" height="368" key="GridCell.Tab.0.bottom" timestamp="1608635600177">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1493" height="321" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608633761378" />
    <state width="1493" height="321" key="GridCell.Tab.0.center" timestamp="1608633761378">
    <state width="1493" height="368" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608635600177" />
    <state width="1493" height="368" key="GridCell.Tab.0.center" timestamp="1608635600177">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1493" height="321" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1608633761378" />
    <state width="1493" height="321" key="GridCell.Tab.0.left" timestamp="1608633761377">
    <state width="1493" height="368" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1608635600177" />
    <state width="1493" height="368" key="GridCell.Tab.0.left" timestamp="1608635600177">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1493" height="321" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1608633761377" />
    <state width="1493" height="321" key="GridCell.Tab.0.right" timestamp="1608633761378">
    <state width="1493" height="368" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1608635600177" />
    <state width="1493" height="368" key="GridCell.Tab.0.right" timestamp="1608635600177">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1493" height="321" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1608633761378" />
    <state width="1031" height="342" key="GridCell.Tab.1.bottom" timestamp="1608633465648">
    <state width="1493" height="368" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1608635600177" />
    <state width="1031" height="342" key="GridCell.Tab.1.bottom" timestamp="1608635494986">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.1.center" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608635494986" />
    <state width="1031" height="342" key="GridCell.Tab.1.center" timestamp="1608635494986">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.1.left" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1608635494986" />
    <state width="1031" height="342" key="GridCell.Tab.1.left" timestamp="1608635494986">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.1.right" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1608635494986" />
    <state width="1031" height="342" key="GridCell.Tab.1.right" timestamp="1608635494986">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.2.bottom" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1608635494986" />
    <state width="1031" height="342" key="GridCell.Tab.2.bottom" timestamp="1608635494987">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.2.center" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1608635494987" />
    <state width="1031" height="342" key="GridCell.Tab.2.center" timestamp="1608635494987">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.2.left" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1608635494987" />
    <state width="1031" height="342" key="GridCell.Tab.2.left" timestamp="1608635494986">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.2.right" timestamp="1608633465648">
    <state width="1031" height="342" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1608635494986" />
    <state width="1031" height="342" key="GridCell.Tab.2.right" timestamp="1608635494987">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
    <state width="1031" height="342" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1608633465648" />
    <state width="1031" height="342" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1608635494987" />
    <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1606714311663">
      <screen x="0" y="0" width="1536" height="824" />
    </state>
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
@@ -95,7 +95,7 @@
    }
    public static void main(String[] args) {
        byte[] bytes = AES.parseHexStr2Byte("A5050B4D17DE52A39ECB57C6B160B8285ED8371239D8A6EBB0D2421B8BB6EA12C580D19459D29B97A31F07C8932D275F61F9F440A2A13FA718539CD06190F82036FE692BDE840784A66CD76E2C0360C25F9055DDB2FE33652B1D126B7720280ACC5471B0EF6BD00CFB478A06E1E78CDD6C310C1DE271BDE5348D6899063ADCDD39DE446236809801A14BF47B5468B96128E45DEFCE8365B83D62AA5C3C1570EA16CC51BC228421FFD731016943D7CEEAD36AD8FA055BE628639CE265F524562F99129823989A8D7B8A9B1B202524672E85464E15EB7E6F50C632C085B5602AD4B42E6D645499C5922D3714B6A987E44DA78059D87D5942F9FEFBB1B610C920F89AB76FC32D4C9E945DCDCE2974539BF928B0A2663954849459F8D127D2B50D7BFD5CF2B506785FB515CB9AB106FA9A40F467E75B5148ACE7A8C5E6650E6A3576396F3D08D6D1B90DB0F4CCDE8D4025B86E45CC32CCBB32CC93E2F248DBD9416D957A0C6E0FD4E35DAE29D2E7C1F6EE6213B6BB566159CF248D14680C4F84C051A754D0F1BE100C715030AC4585327D95743DF8B866817E4F7E59868FCEC8AFEB9C4A75C06FC21590E3A46419D7F75CB8A4DD280FF1D138D1E61E3EDE2C41737D0BA21A739C0A5BF8842479F00D4A8919");
        byte[] bytes = AES.parseHexStr2Byte("5730CB290AD203B32D2FA4347CD54A50A684E16D2C7A4544CF352D54D8A763BA6652C323B13BEEE682A5095B8BCC76842225A914253CE84AFB6B58A9D1BE30A7992786E151A933FDEC6EBDCD1928CA68927047770F296F7541268149B34FDFCEF1340CF2266A041484744CB45B216EE8B4D96E243098F9CB3F661ACA7AF356C422BFE9A009FA478DF606A71DA7DBD776527E5120C3F13281BA8FC5587BACD5E403EE069762B5CF060BFA3CF4FD3417F5653CC178D2CA117284D85F442C0FAB076DB6F6D873B5363FAB93EBA9284CC87A5E97243EF4DC73F1ADA57BD9E9AAB2E4972AC3A4615B2DF6F9062BC04428D1B84B6C892A306F191B1D9DDBBB201D2767CE928020489AFC6BCFDC8A74F8C95080F74B4EC64AD1A6354B17A156B95AA9467C7461BD3C3F15F8F65BD7F3272184435D77003738B5B942EEA9603CFF249764718732595EC44DE4ED1BB763F9C88BAFACF5540E689FE84A4702E31D3D1D05BAC25C10F8E0C3948C777478537397BCB67D37066385DFCBDE3F4A53D6BA14481DBCB07E8452ACD2790A76669A9DE6D7080C8CFD9FB774035FCC3AC1C436581144969B7150318024A2E893FE926654E002097EB4735E49F3A9698A405969888A7D88A55A0FA60318C4A1E2D243BEE6D438");
        byte[] decrypt = AES.decrypt(bytes, Constants.AES_KEY);
        System.out.println(decrypt);
        String s = new String(decrypt);
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/AES.java
@@ -27,7 +27,11 @@
    public static byte[] encrypt(String content, String password) {
        try {
            KeyGenerator kgen = KeyGenerator.getInstance("AES");
            kgen.init(128, new SecureRandom(password.getBytes()));
            SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG") ;
            secureRandom.setSeed(password.getBytes());
            kgen.init(128, secureRandom);
            SecretKey secretKey = kgen.generateKey();
            byte[] enCodeFormat = secretKey.getEncoded();
            SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
@@ -65,9 +69,11 @@
        try {
            String charset = "utf-8";
            KeyGenerator kgen = KeyGenerator.getInstance("AES");
            SecureRandom secureRandom = SecureRandom.getInstance("SHA1PRNG") ;
            secureRandom.setSeed(password.getBytes(charset));
            secureRandom.setSeed(password.getBytes());
            kgen.init(128, secureRandom);
            SecretKey secretKey = kgen.generateKey();
            byte[] enCodeFormat = secretKey.getEncoded();
            SecretKeySpec key = new SecretKeySpec(enCodeFormat, "AES");
@@ -83,7 +89,7 @@
            e.printStackTrace();
        } catch (IllegalBlockSizeException e) {
            e.printStackTrace();
        } catch (BadPaddingException | UnsupportedEncodingException e) {
        } catch (BadPaddingException  e) {
            e.printStackTrace();
        }
        return null;
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/controller/BaseController.class
Binary files differ
springcloud_k8s_panzhihuazhihuishequ/common/target/classes/com/panzhihua/common/utlis/AES.class
Binary files differ