SM3EncodeTest.java 755 字节
package com.tianbo.warehouse;


import com.tianbo.warehouse.security.login.SM4EncryptUtil;
import lombok.extern.slf4j.Slf4j;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = WarehouseApplication.class,webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@Slf4j
public class SM3EncodeTest {


    @Test
    public void encode(){
        String password = "vmvnv1v2VV";



        String SM4encode = new SM4EncryptUtil().pwd(password);
        System.out.println("SM4encode = " + SM4encode);

    }

}