durid连接池


  <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid</artifactId>
            <version>1.0.18</version>
        </dependency>

 


package
com.zf.spring.durid; import org.junit.Test; import com.alibaba.druid.filter.config.ConfigTools; public class DecryptDruid { /** * 对文字进行解密 * @throws Exception */ @Test public void testDecrypt() throws Exception { //解密 String word="inceQV1mknmFmzEGmWBPcG+MamYVREn4aUe+lNIRnhmQ+UuYMHBFSMwGzZv+/zkaPdsmIcOsSdKI1qQUrdjSHg=="; String decryptword = ConfigTools.decrypt(word); System.out.println(decryptword); } /** * 文字进行加密 * @throws Exception */ @Test public void testEncrypt() throws Exception { //加密 String password ="xxxxxxx"; String encryptword = ConfigTools.encrypt(password); System.out.println(encryptword); } }

 

posted @ 2017-03-29 16:01  zfzf1  阅读(460)  评论(0编辑  收藏  举报