20 lines
547 B
Java
Raw Normal View History

2025-08-23 02:50:26 +08:00
package com.cdzy.staff;
import com.cdzy.common.utils.SHA256WithSaltUtil;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest(classes = com.cdzy.staff.EbikeStaffApplication.class)
public class PasswordTest {
@Test
public void test() {
String salt = SHA256WithSaltUtil.generateSalt();
System.out.println(salt);
String password = "123456";
String encrypt = SHA256WithSaltUtil.encrypt(password, salt);
System.out.println(encrypt);
}
}