Class CryptoJksUtils


  • @Component
    public class CryptoJksUtils
    extends CryptoKeyUtils
    The Class CryptoJksUtils.
    • Constructor Detail

      • CryptoJksUtils

        public CryptoJksUtils()
    • 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 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