mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 13:35:50 +01:00
12 lines
225 B
Scala
12 lines
225 B
Scala
package util
|
|
|
|
object StringUtil {
|
|
|
|
def encrypt(value: String): String = {
|
|
val md = java.security.MessageDigest.getInstance("SHA-1")
|
|
md.update(value.getBytes)
|
|
md.digest.map(b => "%02x".format(b)).mkString
|
|
}
|
|
|
|
}
|