com.tsg.techsupportmvc.dao.UserCreate.java Source code

Java tutorial

Introduction

Here is the source code for com.tsg.techsupportmvc.dao.UserCreate.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tsg.techsupportmvc.dao;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.security.crypto.bcrypt.BCrypt;

/**
 *
 * @author apprentice
 */
public class UserCreate {

    public static void main(String[] args) {

        String password = "1234";
        String salt = BCrypt.gensalt();
        String hash = BCrypt.hashpw(password, salt);

        System.out.println(salt);
        System.out.println(hash);
    }

}