18 lines
461 B
Java
18 lines
461 B
Java
package com.ruoyi;
|
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
|
import java.util.Base64;
|
|
|
|
public class BCryptMain {
|
|
public static void main(String[] args) {
|
|
BCryptPasswordEncoder encoder =
|
|
new BCryptPasswordEncoder();
|
|
|
|
System.out.println(
|
|
encoder.encode("123456")
|
|
);
|
|
System.out.println(new String(Base64.getEncoder().encode("lu7213:123456".getBytes())));
|
|
}
|
|
}
|