package com.gem.media.splash.base.crash;


import android.util.Log;

import com.or.ange.dot.utils.LLog;


public class AESEncryptUtil {


    private static final String sSecretKey = "b1ac9861485a652b";
    private static final String iv = "1269571569321210";


    public static byte[] encrypt2(String strToEncrypt) {
        if (null == strToEncrypt) {
            LLog.d("AESEncryptUtil: " , "strToEncrypt is null");
            return new byte[0];
        }
        try {
            return AesUtils.encryptString(sSecretKey, iv, strToEncrypt);
        } catch (Exception e) {
            LLog.d("AESEncryptUtil: " , e.toString());
        }
        return new byte[0];
    }

    public static String decrypt2(String strToDecrypt) {
        if (null == strToDecrypt) {
            LLog.d("AESEncryptUtil: " , "strToDecrypt is null");
            return "";
        }
        try {
            AesCodeC aesCodeC = new AesCodeC(iv, sSecretKey);
            return aesCodeC.decode(strToDecrypt);
        } catch (Throwable e) {
            LLog.d("AESEncryptUtil: " , Log.getStackTraceString(e));
        }
        return "";
    }


}
