Class CryptoPublicKeyUtils

java.lang.Object
com.bld.crypto.bean.CryptoKeyUtils
com.bld.crypto.pubkey.CryptoPublicKeyUtils

@Component public class CryptoPublicKeyUtils extends CryptoKeyUtils
The Class CryptoPublicKeyUtils.
  • Constructor Details

    • CryptoPublicKeyUtils

      public CryptoPublicKeyUtils()
  • Method Details

    • encryptValue

      public String encryptValue(String value, String key)
      Encrypt value.
      Specified by:
      encryptValue in class CryptoKeyUtils
      Parameters:
      value - the value
      key - the key
      Returns:
      the string
    • encryptObject

      public String encryptObject(Object value, String key) throws com.fasterxml.jackson.core.JsonProcessingException
      Encrypt object.
      Parameters:
      value - the value
      key - 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:
      decryptValue in class CryptoKeyUtils
      Parameters:
      value - the value
      key - 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 value
      response - the response
      key - the key
      Returns:
      the t
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException - the json mapping exception
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • encryptUri

      public String encryptUri(String value, String key)
      Encrypt uri.
      Overrides:
      encryptUri in class CryptoKeyUtils
      Parameters:
      value - the value
      key - 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 value
      key - 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:
      decryptUri in class CryptoKeyUtils
      Parameters:
      value - the value
      key - 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 value
      response - the response
      key - the key
      Returns:
      the t
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException - the json mapping exception
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • instanceType

      protected InstanceType instanceType()
      Instance type.
      Specified by:
      instanceType in class CryptoKeyUtils
      Returns:
      the instance type