package com.arms.api.util.aes;

import org.springframework.stereotype.Component;

@Component
public class AES256Decryption {

    private final AES256 aes256;

    public AES256Decryption(AES256 aes256) {
        this.aes256 = aes256;
    }

    public String decrypt(String encryptedText) {
        try {
            return aes256.decrypt(encryptedText);
        } catch (Exception e) {
            throw new RuntimeException("[ AES256Decryption :: decrypt] :: 복호화 중 오류 발생", e);
        }
    }
}
