package com.ltgk.boat;

import com.ltgk.SmartFisheryPortApplication;
import com.ltgk.common.utils.sign.SM4Utils;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @Author: wan kun
 * @Description: TODO
 * @Date: 2024/12/4 11:20
 * @Version: 1.0
 */
@SpringBootTest(classes = SmartFisheryPortApplication.class)
public class BoatTest {
    @Test
    public void testSm4() {
        String str = "hello, world";
        System.out.println("原始字符串: " + str);
        str = SM4Utils.encryptStr(str);
        System.out.println("经过SM4默认密钥加密字符串: " + str);
        str = SM4Utils.decryptStr(str);
        System.out.println("经过SM4默认密钥解密字符串: " + str);
    }
}
