Package com.killcoding.tool
Class CipherTools
java.lang.Object
com.killcoding.tool.CipherTools
This class is support base cipher function
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]_3DESDecrypt(String keyText, String ivText, byte[] encryptData) static byte[]_3DESEncrypt(String keyText, String ivText, byte[] data) static byte[]AESDecrypt(String keyText, byte[] encryptData) static byte[]AESEncrypt(String keyText, byte[] data) static byte[]DESDecrypt(String keyText, String ivText, byte[] encryptData) static byte[]DESEncrypt(String keyText, String ivText, byte[] data) static byte[]generateAESKey(String keyText) static byte[]RSADecrypt(Key key, byte[] encryptData) static byte[]RSAEncrypt(Key key, byte[] data) static PrivateKeyRSAPrivateKeyFrom(byte[] keyArray) static byte[]RSAPrivateKeyGen(byte[] seed) static PublicKeyRSAPublicKeyFrom(byte[] keyArray) static byte[]RSAPublieKeyGen(byte[] seed)
-
Constructor Details
-
CipherTools
public CipherTools()
-
-
Method Details
-
DESEncrypt
- Throws:
Exception
-
DESDecrypt
- Throws:
Exception
-
_3DESEncrypt
- Throws:
Exception
-
_3DESDecrypt
public static byte[] _3DESDecrypt(String keyText, String ivText, byte[] encryptData) throws Exception - Throws:
Exception
-
AESEncrypt
- Throws:
Exception
-
AESDecrypt
- Throws:
Exception
-
generateAESKey
- Throws:
Exception
-
RSAPrivateKeyGen
- Throws:
Exception
-
RSAPublieKeyGen
- Throws:
Exception
-
RSAPublicKeyFrom
- Throws:
Exception
-
RSAPrivateKeyFrom
- Throws:
Exception
-
RSAEncrypt
- Throws:
Exception
-
RSADecrypt
- Throws:
Exception
-