Package com.bld.crypto.jks
Class CryptoJksUtils
- java.lang.Object
-
- com.bld.crypto.bean.CryptoKeyUtils
-
- com.bld.crypto.jks.CryptoJksUtils
-
@Component public class CryptoJksUtils extends CryptoKeyUtils
The Class CryptoJksUtils.
-
-
Field Summary
Fields Modifier and Type Field Description static StringBEARERThe Constant BEARER.static intSPLIT_STRINGThe Constant SPLIT_STRING.-
Fields inherited from class com.bld.crypto.bean.CryptoKeyUtils
_252F, _2F, objMapper
-
-
Constructor Summary
Constructors Constructor Description CryptoJksUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <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.StringdecryptUri(String value)Decrypt uri.StringdecryptUri(String value, CryptoType cryptoType)Decrypt uri.StringdecryptValue(String value)Decrypt value.StringdecryptValue(String value, CryptoType cryptoType)Decrypt value.protected StringdecryptValue(String value, String key)Decrypt value.StringencryptObject(Object value)Encrypt object.StringencryptObject(Object value, CryptoType cryptoType)Encrypt object.StringencryptObjectUri(Object value)Encrypt object uri.StringencryptObjectUri(Object value, CryptoType cryptoType)Encrypt object uri.StringencryptUri(String value)Encrypt uri.StringencryptUri(String value, CryptoType cryptoType)Encrypt uri.StringencryptValue(String value)Encrypt value.StringencryptValue(String value, CryptoType cryptoType)Encrypt value.protected StringencryptValue(String value, String key)Encrypt value.protected InstanceTypeinstanceType()Instance type.-
Methods inherited from class com.bld.crypto.bean.CryptoKeyUtils
decryptUri, decryptValue, encodeValue, encryptUri, encryptValue, getCipher
-
-
-
-
Field Detail
-
SPLIT_STRING
public static final int SPLIT_STRING
The Constant SPLIT_STRING.- See Also:
- Constant Field Values
-
BEARER
public static final String BEARER
The Constant BEARER.- See Also:
- Constant Field Values
-
-
Method Detail
-
encryptValue
public String encryptValue(String value)
Encrypt value.- Parameters:
value- the value- Returns:
- the string
-
decryptValue
public String decryptValue(String value)
Decrypt value.- Parameters:
value- the value- Returns:
- the string
-
encryptObject
public String encryptObject(Object value) throws com.fasterxml.jackson.core.JsonProcessingException
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
public String encryptUri(String value, CryptoType cryptoType)
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
public String decryptUri(String value, CryptoType cryptoType)
Decrypt uri.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
-
decryptValue
public String decryptValue(String value, CryptoType cryptoType)
Decrypt value.- Parameters:
value- the valuecryptoType- the crypto type- Returns:
- the string
-
encryptValue
public String encryptValue(String value, CryptoType cryptoType)
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
public String encryptUri(String value)
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
public String decryptUri(String value)
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
protected String encryptValue(String value, String key)
Encrypt value.- Specified by:
encryptValuein classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
decryptValue
protected String decryptValue(String value, String key)
Decrypt value.- Specified by:
decryptValuein classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
instanceType
protected InstanceType instanceType()
Instance type.- Specified by:
instanceTypein classCryptoKeyUtils- Returns:
- the instance type
-
-