com.alibaba.druid.filter.config
类 ConfigTools

java.lang.Object
  继承者 com.alibaba.druid.filter.config.ConfigTools

public class ConfigTools
extends Object


字段摘要
static String DEFAULT_PUBLIC_KEY_STRING
           
 
构造方法摘要
ConfigTools()
           
 
方法摘要
static String decrypt(PublicKey publicKey, String cipherText)
           
static String decrypt(String cipherText)
           
static String decrypt(String publicKeyText, String cipherText)
           
static String encrypt(byte[] keyBytes, String plainText)
           
static String encrypt(String plainText)
           
static String encrypt(String key, String plainText)
           
static String[] genKeyPair(int keySize)
           
static byte[][] genKeyPairBytes(int keySize)
           
static PublicKey getPublicKey(String publicKeyText)
           
static PublicKey getPublicKeyByPublicKeyFile(String publicKeyFile)
           
static PublicKey getPublicKeyByX509(String x509File)
           
static void main(String[] args)
           
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

DEFAULT_PUBLIC_KEY_STRING

public static final String DEFAULT_PUBLIC_KEY_STRING
另请参见:
常量字段值
构造方法详细信息

ConfigTools

public ConfigTools()
方法详细信息

main

public static void main(String[] args)
                 throws Exception
抛出:
Exception

decrypt

public static String decrypt(String cipherText)
                      throws Exception
抛出:
Exception

decrypt

public static String decrypt(String publicKeyText,
                             String cipherText)
                      throws Exception
抛出:
Exception

getPublicKeyByX509

public static PublicKey getPublicKeyByX509(String x509File)

getPublicKey

public static PublicKey getPublicKey(String publicKeyText)

getPublicKeyByPublicKeyFile

public static PublicKey getPublicKeyByPublicKeyFile(String publicKeyFile)

decrypt

public static String decrypt(PublicKey publicKey,
                             String cipherText)
                      throws Exception
抛出:
Exception

encrypt

public static String encrypt(String plainText)
                      throws Exception
抛出:
Exception

encrypt

public static String encrypt(String key,
                             String plainText)
                      throws Exception
抛出:
Exception

encrypt

public static String encrypt(byte[] keyBytes,
                             String plainText)
                      throws Exception
抛出:
Exception

genKeyPairBytes

public static byte[][] genKeyPairBytes(int keySize)
                                throws NoSuchAlgorithmException
抛出:
NoSuchAlgorithmException

genKeyPair

public static String[] genKeyPair(int keySize)
                           throws NoSuchAlgorithmException
抛出:
NoSuchAlgorithmException


Copyright © 2013 Alibaba Group. All Rights Reserved.