Rename StringUtil#encrypt() to sha1().

This commit is contained in:
takezoe
2013-07-11 11:09:30 +09:00
parent 0170f9b44a
commit f104fab593
5 changed files with 7 additions and 7 deletions

View File

@@ -2,7 +2,7 @@ package util
object StringUtil {
def encrypt(value: String): String = {
def sha1(value: String): String = {
val md = java.security.MessageDigest.getInstance("SHA-1")
md.update(value.getBytes)
md.digest.map(b => "%02x".format(b)).mkString