Class CryptoString


  • public final class CryptoString
    extends Object
    Converts byte array to crypto string and back in the same fashion as it is done by the Adobe Granite Crypto implementation.
    • Method Detail

      • isCryptoString

        public static boolean isCryptoString​(String text)
        Checks if the given string contains an encrypted string.
        Parameters:
        text - String to check
        Returns:
        true if string is assumed to be encrypted
      • toString

        public static String toString​(byte[] data)
        Converts byte array to hex string enclosed in curly braces.
        Parameters:
        data - Binary data
        Returns:
        Binary data string
      • toByteArray

        public static byte[] toByteArray​(String text)
        Converts hex string enclosed in curly braces back to byte array.
        Parameters:
        text - Binary data string
        Returns:
        Binary data