Class ByteEfficient

java.lang.Object
io.github.enxign.core.shed.ByteEfficient

public class ByteEfficient extends Object
ByteEfficient This class provides methods for byte array manipulation, including conversion to hexadecimal strings, padding for encryption, and UTF-8 validation.
  • Constructor Details

    • ByteEfficient

      public ByteEfficient()
  • Method Details

    • byte2Hex

      public static String byte2Hex(byte[] bytes)
      byte 배열을 16진수 문자열로 변환
      Parameters:
      bytes - byte 배열
      Returns:
      16진수 문자열
    • addPadding

      public static byte[] addPadding(byte[] bySrc, int iBlockSize)
      암호화 패딩 처리
      Parameters:
      bySrc - byte 대상 문자열
      iBlockSize - int 암호화 블록 크기
      Returns:
      byte 배열
    • removePadding

      public static byte[] removePadding(byte[] bySrc)
      암호화 패딩 처리된 부분 제거.
      Parameters:
      bySrc - byte 대상 문자열
      Returns:
      byte 배열
    • charLength

      public static int charLength(byte[] bySrc)
      문자 크기 반환 utf8 or euc-kr 문자 구분
      Parameters:
      bySrc - byte 배열
      Returns:
      int 문자 크기
    • isUTF8

      public static boolean isUTF8(byte[] bySrc)
      Validate a UTF-8 byte array
      Parameters:
      bySrc - byte 배열
      Returns:
      boolean true if valid UTF-8, false otherwise