Groovy调用MD5加密

 

import java.security.MessageDigest
def today = new Date().format("yyyy-MM-dd")
def snstr = ‘a=$a&b=$b&today=$today’
def sn = MessageDigest.getInstance("MD5").digest("$snstr".bytes).encodeHex().toString().toLowerCase()

 

posted on 2020-11-10 11:23  momingliu11  阅读(1814)  评论(0编辑  收藏  举报