Java tutorial
/* * 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.atlantex.game.util; import org.apache.commons.codec.digest.DigestUtils; /** * * @author WILLY */ public class PasswordUtils { public static String encrypt(String toEncrypt) { String encrypted = DigestUtils.sha256Hex(toEncrypt); return encrypted; } }