package com.malk.siku;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.codec.digest.DigestUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@Slf4j
@SpringBootTest
@RunWith(SpringRunner.class)
public class SkTest {
    @Test
    public void getSecret(){
        String appCode="AP52Y01LHHTAP9";
        String appSecret="N4WuERLteAUPaWebnsHy";

        long timeMillis = System.currentTimeMillis();
        log.info("time：{}",timeMillis);

        String s = DigestUtils.sha256Hex(appSecret + ":" + appCode + ":" + timeMillis);
        log.info("s:{}",s);
    }
}
