Package com.bld.crypto.pubkey
Class CryptoPublicKeyUtils
- java.lang.Object
-
- com.bld.crypto.bean.CryptoKeyUtils
-
- com.bld.crypto.pubkey.CryptoPublicKeyUtils
-
@Component public class CryptoPublicKeyUtils extends CryptoKeyUtils
The Class CryptoPublicKeyUtils.
-
-
Field Summary
-
Fields inherited from class com.bld.crypto.bean.CryptoKeyUtils
_252F, _2F, objMapper
-
-
Constructor Summary
Constructors Constructor Description CryptoPublicKeyUtils()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TdecryptObject(String value, Class<T> response, String key)Decrypt object.<T> TdecryptObjectUri(String value, Class<T> response, String key)Decrypt object uri.StringdecryptUri(String value, String key)Decrypt uri.StringdecryptValue(String value, String key)Decrypt value.StringencryptObject(Object value, String key)Encrypt object.StringencryptObjectUri(Object value, String key)Encrypt object uri.StringencryptUri(String value, String key)Encrypt uri.StringencryptValue(String value, String key)Encrypt value.protected InstanceTypeinstanceType()Instance type.-
Methods inherited from class com.bld.crypto.bean.CryptoKeyUtils
decryptValue, encodeValue, encryptValue, getCipher
-
-
-
-
Method Detail
-
encryptValue
public String encryptValue(String value, String key)
Encrypt value.- Specified by:
encryptValuein classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
encryptObject
public String encryptObject(Object value, String key) throws com.fasterxml.jackson.core.JsonProcessingException
Encrypt object.- Parameters:
value- the valuekey- the key- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
decryptValue
public String decryptValue(String value, String key)
Decrypt value.- Specified by:
decryptValuein classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
decryptObject
public <T> T decryptObject(String value, Class<T> response, String key) throws com.fasterxml.jackson.databind.JsonMappingException, com.fasterxml.jackson.core.JsonProcessingException
Decrypt object.- Type Parameters:
T- the generic type- Parameters:
value- the valueresponse- the responsekey- the key- Returns:
- the t
- Throws:
com.fasterxml.jackson.databind.JsonMappingException- the json mapping exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
encryptUri
public String encryptUri(String value, String key)
Encrypt uri.- Overrides:
encryptUriin classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
encryptObjectUri
public String encryptObjectUri(Object value, String key) throws com.fasterxml.jackson.core.JsonProcessingException
Encrypt object uri.- Parameters:
value- the valuekey- the key- Returns:
- the string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
decryptUri
public String decryptUri(String value, String key)
Decrypt uri.- Overrides:
decryptUriin classCryptoKeyUtils- Parameters:
value- the valuekey- the key- Returns:
- the string
-
decryptObjectUri
public <T> T decryptObjectUri(String value, Class<T> response, String key) 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 responsekey- the key- Returns:
- the t
- Throws:
com.fasterxml.jackson.databind.JsonMappingException- the json mapping exceptioncom.fasterxml.jackson.core.JsonProcessingException- the json processing exception
-
instanceType
protected InstanceType instanceType()
Instance type.- Specified by:
instanceTypein classCryptoKeyUtils- Returns:
- the instance type
-
-