Package com.bld.crypto.jks
Class CryptoJksUtils
java.lang.Object
com.bld.crypto.bean.CryptoKeyUtils
com.bld.crypto.jks.CryptoJksUtils
The Class CryptoJksUtils.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe Constant BEARER.static final intThe Constant SPLIT_STRING.Fields inherited from class com.bld.crypto.bean.CryptoKeyUtils
_252F, _2F, objMapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> TdecryptObject(String value, Class<T> response) Decrypt object.<T> TdecryptObject(String value, Class<T> response, CryptoType cryptoType) Decrypt object.<T> TdecryptObjectUri(String value, Class<T> response) Decrypt object uri.decryptUri(String value) Decrypt uri.decryptUri(String value, CryptoType cryptoType) Decrypt uri.decryptValue(String value) Decrypt value.decryptValue(String value, CryptoType cryptoType) Decrypt value.protected StringdecryptValue(String value, String key) Decrypt value.encryptObject(Object value) Encrypt object.encryptObject(Object value, CryptoType cryptoType) Encrypt object.encryptObjectUri(Object value) Encrypt object uri.encryptObjectUri(Object value, CryptoType cryptoType) Encrypt object uri.encryptUri(String value) Encrypt uri.encryptUri(String value, CryptoType cryptoType) Encrypt uri.encryptValue(String value) Encrypt value.encryptValue(String value, CryptoType cryptoType) Encrypt value.protected StringencryptValue(String value, String key) Encrypt value.protected InstanceTypeInstance type.Methods inherited from class com.bld.crypto.bean.CryptoKeyUtils
decryptUri, decryptValue, encodeValue, encryptUri, encryptValue, getCipher
-
Field Details
-
SPLIT_STRING
public static final int SPLIT_STRINGThe Constant SPLIT_STRING.- See Also:
-
BEARER
The Constant BEARER.- See Also:
-
-
Constructor Details
-
CryptoJksUtils
public CryptoJksUtils()
-
-
Method Details
-
encryptValue
Encrypt value.- Parameters:
value- the value- Returns:
- the string
-
decryptValue
Decrypt value.- Parameters:
value- the value- Returns:
- the string
-
encryptObject
Encrypt object.- Parameters:
value- the value- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
decryptObject
public <T> T decryptObject(String value, Class<T> response) throws com.fasterxml.jackson.core.JsonProcessingException Decrypt object.- Type Parameters:
T- the generic type- Parameters:
value- the valueresponse- the response- Returns:
- the t
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
encryptUri
Encrypt uri.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
-
encryptObjectUri
public String encryptObjectUri(Object value, CryptoType cryptoType) throws com.fasterxml.jackson.core.JsonProcessingException Encrypt object uri.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
decryptUri
Decrypt uri.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
-
decryptValue
Decrypt value.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
-
encryptValue
Encrypt value.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
-
decryptObject
public <T> T decryptObject(String value, Class<T> response, CryptoType cryptoType) throws com.fasterxml.jackson.core.JsonProcessingException Decrypt object.- Type Parameters:
T- the generic type- Parameters:
value- the valueresponse- the responsecryptoType- the crypto type- Returns:
- the t
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
encryptObject
public String encryptObject(Object value, CryptoType cryptoType) throws com.fasterxml.jackson.core.JsonProcessingException Encrypt object.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
encryptUri
Encrypt uri.- Parameters:
value- the value- Returns:
- the string
-
encryptObjectUri
public String encryptObjectUri(Object value) throws com.fasterxml.jackson.core.JsonProcessingException Encrypt object uri.- Parameters:
value- the value- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
decryptUri
Decrypt uri.- Parameters:
value- the value- Returns:
- the string
-
decryptObjectUri
public <T> T decryptObjectUri(String value, Class<T> response) throws com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException Decrypt object uri.- Type Parameters:
T- the generic type- Parameters:
value- the valueresponse- the response- Returns:
- the t
- Throws:
com.fasterxml.jackson.databind.JsonMappingException- the json mapping exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
encryptValue
Encrypt value.- Specified by:
encryptValuein classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
decryptValue
Decrypt value.- Specified by:
decryptValuein classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
instanceType
Instance type.- Specified by:
instanceTypein classCryptoKeyUtils- Returns:
- the instance type
-