Class DESede

java.lang.Object
io.github.enxign.shed.cipher.DESede

public class DESede extends Object
DESede 이전 방식이라 사용안함. 참고자료
Since:
2021-02-01
Version:
1.0
 수정일        수정자       수정내용
 ----------   ---------   -------------------------------
 2021-02-01   first       create
 
Author:
enxign
  • Constructor Details

    • DESede

      public DESede() throws Exception
      DESede 생성자
      Throws:
      Exception - 예외처리
    • DESede

      public DESede(String keyVal) throws Exception
      DESede 생성자
      Parameters:
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • DESede

      public DESede(byte[] keyVal) throws Exception
      DESede 생성자
      Parameters:
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • DESede

      public DESede(String algorithm, String keyVal) throws Exception
      DESede 생성자
      Parameters:
      algorithm - DESede 암호화 알고리즘
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • DESede

      public DESede(String algorithm, byte[] keyVal) throws Exception
      DESede 생성자
      Parameters:
      algorithm - DESede 암호화 알고리즘
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
  • Method Details

    • init

      public static void init(String keyVal) throws Exception
      DESede 초기화
      Parameters:
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • init

      public static void init(byte[] keyVal) throws Exception
      DESede 초기화
      Parameters:
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • init

      public static void init(String algorithm, String keyVal) throws Exception
      DESede 초기화
      Parameters:
      algorithm - DESede 암호화 알고리즘
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • init

      public static void init(String algorithm, byte[] keyVal) throws Exception
      DESede 초기화
      Parameters:
      algorithm - DESede 암호화 알고리즘
      keyVal - DESede 암호화 키
      Throws:
      Exception - 예외처리
    • returnEncryptCode

      public static String returnEncryptCode(String keyVal, String str) throws Exception
      DESede 암호화 코드 반환
      Parameters:
      keyVal - DESede 암호화 키
      str - 문자열
      Returns:
      암호화 된 문자열
      Throws:
      Exception - 예외처리
    • returnEncryptCode

      public static String returnEncryptCode(String algorithm, String keyVal, String str) throws Exception
      DESede 암호화 코드 반환
      Parameters:
      algorithm - DESede 암호화 알고리즘
      keyVal - DESede 암호화 키
      str - 문자열
      Returns:
      암호화 된 문자열
      Throws:
      Exception - 예외처리
    • returnEncryptCode

      public static String returnEncryptCode(String str) throws Exception
      DESede 암호화 코드 반환
      Parameters:
      str - 문자열
      Returns:
      암호화 된 문자열
      Throws:
      Exception - 예외처리
    • returnDecryptCode

      public static String returnDecryptCode(String keyVal, String str) throws Exception
      DESede 복호화 코드 반환
      Parameters:
      keyVal - DESede 암호화 키
      str - 암호화 된 문자열
      Returns:
      복호화 된 문자열
      Throws:
      Exception - 예외처리
    • returnDecryptCode

      public static String returnDecryptCode(String algorithm, String keyVal, String str) throws Exception
      DESede 복호화 코드 반환
      Parameters:
      algorithm - DESede 암호화 알고리즘
      keyVal - DESede 암호화 키
      str - 암호화 된 문자열
      Returns:
      복호화 된 문자열
      Throws:
      Exception - 예외처리
    • returnDecryptCode

      public static String returnDecryptCode(String str) throws Exception
      DESede 복호화 코드 반환
      Parameters:
      str - 암호화 된 문자열
      Returns:
      복호화 된 문자열
      Throws:
      Exception - 예외처리
    • encrypt

      protected static byte[] encrypt(String input) throws InvalidKeyException, BadPaddingException, IllegalBlockSizeException
      DESede 암호화
      Parameters:
      input - 문자열
      Returns:
      암호화 된 바이트 배열
      Throws:
      InvalidKeyException - 예외처리
      BadPaddingException - 예외처리
      IllegalBlockSizeException - 예외처리
    • decrypt

      protected static String decrypt(byte[] encryptionBytes) throws InvalidKeyException, BadPaddingException, IllegalBlockSizeException
      DESede 복호화
      Parameters:
      encryptionBytes - 암호화 된 바이트 배열
      Returns:
      복호화 된 문자열
      Throws:
      InvalidKeyException - 예외처리
      BadPaddingException - 예외처리
      IllegalBlockSizeException - 예외처리
    • generateSecretKey

      protected static Key generateSecretKey(String algorithms, byte[] keyValues) throws NoSuchAlgorithmException, InvalidKeySpecException, Exception
      DESede 암호화 키 생성
      Parameters:
      algorithms - DESede 암호화 알고리즘
      keyValues - DESede 암호화 키
      Returns:
      SecretKey
      Throws:
      NoSuchAlgorithmException - 예외처리
      InvalidKeySpecException - 예외처리
      Exception - 예외처리
    • generateSecretKey

      protected static Key generateSecretKey(String algorithms) throws Exception
      DESede 암호화 키 생성
      Parameters:
      algorithms - DESede 암호화 알고리즘
      Returns:
      SecretKey
      Throws:
      Exception - 예외처리