com.alibaba.druid.filter.config
类 ConfigTools
java.lang.Object
com.alibaba.druid.filter.config.ConfigTools
public class ConfigTools
- extends Object
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.