airport.services.users.PasswordHashImpl.java Source code

Java tutorial

Introduction

Here is the source code for airport.services.users.PasswordHashImpl.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 airport.services.users;

import org.apache.commons.codec.digest.DigestUtils;
import org.springframework.stereotype.Component;

/**
 *
 * @author mcdoker
 */
@Component
public class PasswordHashImpl implements PasswordHash {

    @Override
    public String getHashPassword(String password) {
        return DigestUtils.sha256Hex(password);
    }

}