package com.continuuity.passport.core.utils;

import com.google.common.hash.HashCode;
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;

/**
 *
 */
public class PasswordUtils {
  private final static HashFunction hashFunction = Hashing.sha1();

  public static String generateHashedPassword(String password) {
    HashCode hashCode = hashFunction.newHasher().putString(password).hash();
    return hashCode.toString();
  }

}

Add sha1 hash to passwords
Add sha1 hash to passwords
