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 Details

  • Constructor Details

    • CryptoJksUtils

      public CryptoJksUtils()
  • Method Details

    • 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 value
      response - 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 value
      cryptoType - 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 value
      cryptoType - 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 value
      cryptoType - the crypto type
      Returns:
      the string
    • decryptValue

      public String decryptValue(String value, CryptoType cryptoType)
      Decrypt value.
      Parameters:
      value - the value
      cryptoType - the crypto type
      Returns:
      the string
    • encryptValue

      public String encryptValue(String value, CryptoType cryptoType)
      Encrypt value.
      Parameters:
      value - the value
      cryptoType - 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 value
      response - the response
      cryptoType - 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 value
      cryptoType - 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 value
      response - the response
      Returns:
      the t
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException - the json mapping exception
      com.fasterxml.jackson.core.JsonProcessingException - the json processing exception
    • encryptValue

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

      protected String decryptValue(String value, String key)
      Decrypt value.
      Specified by:
      decryptValue in class CryptoKeyUtils
      Parameters:
      value - the value
      key - the key
      Returns:
      the string
    • instanceType

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