Package com.jk.core.security
Class JKSecurityUtil
java.lang.Object
com.jk.core.security.JKSecurityUtil
The Class JKSecurityUtil.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic PasswordcreatePassword(char[] password) Creates the password.static PasswordcreatePassword(String text) Creates the password.static StringDecode.static StringDecode.static byte[]decodeFromBase64(String string) Decode from base 64.static StringDecrypt.static StringEncode.static StringencodeInToBase64(byte[] string) Encode in to base 64.static Stringencrypt(byte[] plainText) Encrypt.static String...static byte[]hash(char[] data, byte[] salt) Hash.static voidThe main method.static StringmaskString(String text) Mask string.static byte[]paddArray(byte[] original, int padding) Padd array.protected static byte[]processEncyrption(byte[] text, int encryptMode) Process encyrption.static byte[]salt()Salt. 
- 
Constructor Details
- 
JKSecurityUtil
public JKSecurityUtil() 
 - 
 - 
Method Details
- 
main
The main method.- Parameters:
 args- the arguments- Throws:
 Exception- the exception
 - 
encrypt
Encrypt.- Parameters:
 plainText- the plain text- Returns:
 - the byte[]
 
 - 
encrypt
...- Parameters:
 plainText- ...- Returns:
 - ...
 
 - 
decrypt
Decrypt.- Parameters:
 cipherBytes- the cipher bytes- Returns:
 - the encrypted string
 
 - 
processEncyrption
protected static byte[] processEncyrption(byte[] text, int encryptMode) Process encyrption.- Parameters:
 text- the textencryptMode- the encrypt mode- Returns:
 - the byte[]
 
 - 
paddArray
public static byte[] paddArray(byte[] original, int padding) Padd array.- Parameters:
 original- the originalpadding- the padding- Returns:
 - the byte[]
 
 - 
decode
Decode.- Parameters:
 source- the source- Returns:
 - the string
 
 - 
decodeFromBase64
Decode from base 64.- Parameters:
 string- the string- Returns:
 - the byte[]
 
 - 
encode
Encode.- Parameters:
 source- the source- Returns:
 - the string
 
 - 
encodeInToBase64
Encode in to base 64.- Parameters:
 string- the string- Returns:
 - the string
 
 - 
salt
public static byte[] salt()Salt.- Returns:
 - the byte[]
 
 - 
hash
public static byte[] hash(char[] data, byte[] salt) Hash.- Parameters:
 data- the datasalt- the salt- Returns:
 - the byte[]
 
 - 
createPassword
Creates the password.- Parameters:
 password- the password- Returns:
 - the password
 
 - 
maskString
Mask string.- Parameters:
 text- the text- Returns:
 - the string
 
 - 
createPassword
Creates the password.- Parameters:
 text- the text- Returns:
 - the password
 
 - 
d
Decode.- Parameters:
 source- the source- Returns:
 - the string
 
 
 -