kylin的配置账号密码的加密方法

kylin安装过程中,配置账户,其中密码是加密的。生成密码对应密文的
方法如下:

import java.io.PrintStream;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

public class KylinPassword
{
  public static void main(String[] args)
  {
    PasswordEncoder encoder = new BCryptPasswordEncoder();

    if (args.length != 1) {
      System.out.println("请输入参数,参数是密码原文");
      System.exit(1);
    }

    String passwd = encoder.encode(args[0]);

    System.out.println("密文是:" + passwd);
  }
}

相关文章:

  • 2021-07-25
  • 2021-09-19
  • 2021-10-14
  • 2022-12-23
  • 2021-07-25
猜你喜欢
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-07-18
  • 2022-01-07
  • 2021-08-17
相关资源
相似解决方案