1. 程式人生 > >idea 安裝mybatis plugin (mybatis插件)

idea 安裝mybatis plugin (mybatis插件)

tor plugin 找到 cipher int images str cep out

技術分享

安裝上以後需要破解,先找到下面的文件

技術分享

打開文件,設置其中的key 和 value :

技術分享

這裏面的key 和 value 哪兒來呢?

使用下面的代碼運行一下即可得到:

public class App 
{
    public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException {
        KeyPairGenerator keygen 
= KeyPairGenerator.getInstance("RSA"); keygen.initialize(512); KeyPair kp = keygen.generateKeyPair(); RSAPrivateKey privateKey = (RSAPrivateKey)kp.getPrivate(); RSAPublicKey publicKey = (RSAPublicKey)kp.getPublic(); System.out.println("KEY:\n" + bytesToHexString(publicKey.getEncoded()) + "\n"); Cipher cipher
= Cipher.getInstance("RSA"); cipher.init(Cipher.ENCRYPT_MODE,privateKey); System.out.println("RESULT:\n" + bytesToHexString(cipher.doFinal("EamonSec".getBytes())) + "\n"); } private static String bytesToHexString(byte[] src){ StringBuilder stringBuilder = new StringBuilder("");
if (src == null || src.length <= 0) { return null; } for (byte aSrc : src) { int v = aSrc & 0xFF; String hv = Integer.toHexString(v); if (hv.length() < 2) { stringBuilder.append(0); } stringBuilder.append(hv); } return stringBuilder.toString(); } }

idea 安裝mybatis plugin (mybatis插件)