kongzy
2024-09-14 f0f00e9ba8a755e4317e029d73b69a92ad9f9df1
exam-admin/src/test/java/com/gkhy/exam/admin/PasswordTest.java
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Random;
@RunWith(SpringRunner.class)
@@ -23,12 +24,14 @@
    @Test
    public void passwordGenerate(){
        String password="Gkhy@c413";
        System.out.println(SecurityUtils.encryptPassword(password));
        String enpass=SecurityUtils.encryptPassword(password);
        System.out.println(enpass);
        System.out.println(Base64.encode(password));
        System.out.println(SecurityUtils.encryptPassword(password));
        String pp="R2toeUBjNDEz";
        System.out.println(SecurityUtils.encryptPassword(Base64.decodeStr(pp)));
//        System.out.println(SecurityUtils.encryptPassword(password));
//
//        String pp="R2toeUBjNDEz";
//        System.out.println(SecurityUtils.encryptPassword(Base64.decodeStr(pp)));
    }
    @Test
@@ -63,4 +66,15 @@
        b.add("c");
        return aa;
    }
    @Test
    public void testNum(){
        Integer a=null;
        int b=0;
        if(Optional.ofNullable(a).orElse(0)>b){
            System.out.println("gggggg");
        }else{
            System.out.println("hhhhhh");
        }
    }
}