Class StiPacker

java.lang.Object
com.stimulsoft.base.StiPacker

public class StiPacker extends Object
Copyright Stimulsoft
  • Field Details

    • allowPacking

      public static boolean allowPacking
  • Constructor Details

    • StiPacker

      public StiPacker()
  • Method Details

    • pack

      public static byte[] pack(byte[] bytes) throws IOException
      Packs the byte array.
      Parameters:
      bytes -
      Returns:
      Throws:
      IOException
    • unpackAndDecrypt

      public static byte[] unpackAndDecrypt(String str) throws NoSuchAlgorithmException
      Unpacks and uncrypts byte array from base64 string.
      Parameters:
      str -
      Returns:
      Throws:
      NoSuchAlgorithmException
    • unpack

      public static byte[] unpack(int[] bytes)
      Unpacks byte array.
      Parameters:
      bytes -
      Returns:
    • isPacked

      public static boolean isPacked(int[] bytes)
      Returns true if the specified byte array is packed.
      Parameters:
      bytes -
      Returns:
    • packAndEncryptToString

      public static String packAndEncryptToString(byte[] bytes) throws IOException, NoSuchAlgorithmException
      Packs and encrypts the byte array to the byte64 string.
      Parameters:
      bytes -
      Returns:
      Throws:
      IOException
      NoSuchAlgorithmException