TightCouplingProcessor.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:service-block-samples 作者:
/**
 * Converts an arbitrary message into an MD5 hash and returns it as a UTF-8 encoded string
 *
 * @param message is the message to convert
 * @return a UTF-8 encoded string representation of the MD5 hash
 */
String getMd5Hash(String message) {
    String result;

    try {
        MessageDigest md5 = MessageDigest.getInstance(MD5);
        result = (new HexBinaryAdapter()).marshal(md5.digest(message.getBytes())).toLowerCase();
    } catch (NoSuchAlgorithmException e) {
        throw new RuntimeException("Error converting message to MD5 hash", e);
    }

    return result;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号