guava实现MD5加密

java源码不太方便实现MD5加密, 工程中引用apache guava包来实现

实现代码

String a = "I'm testing";

String md = Hashing.md5().newHasher().putString(pwd, Charsets.UTF_8).hash().toString();

System.out.println(md);      //-> 4e939e26ea96fd34ca09d5defe35da7b

结果为32位小写md5, 转换为16位需要 substring(8,24)


  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
├─Google Guava 第01讲-Joiner详细介绍以及和Java8Collector对比.wmv ├─Google Guava 第02讲-Guava Splitter详细讲解以及实战练习.wmv ├─Google Guava 第03讲-Preconditions&Objects;&assert;讲解.wmv ├─Google Guava 第04讲-Objects&MoreObjects;&ComparisonChain;.wmv ├─Google Guava 第05讲-Strings&Charsets;&CharMatcher;.wmv ├─Google Guava 第06讲-Guava之函数式接口(非常类似Java8,熟悉的可以不看).wmv ├─Google Guava 第07讲-Guava之StopWatch和JDK之ServiceLoader讲解.wmv ├─Google Guava 第08讲-Guava之Files讲解(废话比较多).wmv ├─Google Guava 第09讲-Guava之Files讲解第二部分.wmv ├─Google Guava 第10讲-Guava之Files讲解第三部分.wmv ├─Google Guava 第11讲-Guava之CharSource和CharSink源码剖析.wmv ├─Google Guava 第12讲-Guava之ByteSource和ByteSink源码剖析.wmv ├─Google Guava 第13讲-Guava之CharStreams和ByteStreams源码剖析(比较简单).wmv ├─Google Guava 第14讲-Guava之Closer使用和原理剖析,非常重要.wmv ├─Google Guava 第15讲-Base64原理详解,手动实现base64的Encoding.wmv ├─Google Guava 第16讲-Base64原理详解,手动实现base64的Decoding.wmv ├─Google Guava 第17讲-Guava之EventBus的使用详解.wmv ├─Google Guava 第18讲-Guava之EventBus的使用详解-2.wmv ├─Google Guava 第19讲-Guava之EventBus和NIO2.0 WatchService综合实战.wmv ├─Google Guava 第20讲-实战:手动实现一个EventBus-01快速搭建程序结构.wmv ├─Google Guava 第21讲-实战:手动实现一个EventBus-02快速实现程序功能.wmv ├─Google Guava 第22讲-实战:手动实现一个EventBus-03总结与查缺补漏.wmv ├─Google Guava 第23讲-Guava EventBus源码剖析以及优缺点总结.wmv ├─Google Guava 第24讲-Guava之Monitor使用讲解.wmv ├─Google Guava 第25讲-Guava之RateLimiter在漏桶限流算法中的使用.wmv ├─Google Guava 第26讲-Guava之RateLimiter令牌桶算法的使用.wmv ├─Google Guava 第27讲-ListenableFuture,FutureCallBack讲解.wmv ├─Google Guava 第28讲-LRU算法原理以及两种LRU算法的实现.wmv ├─Google Guava 第29讲-SoftReference,WeakReference,PhantomReference精讲.wmv ├─Google Guava 第30讲-SoftReference加LRU算法实现InMemoryCache.wmv ├─Google Guava 第31讲-Guava之CacheLoader,CacheBuilder,LoadingCache以及两种驱逐策略讲解.wmv ├─Google Guava 第32讲-Guava之WeakKey,SoftValues,时间逐出的两种策略.wmv ├─Google Guava 第33讲-Guava Cache之NullValue,Removal通知,Refresh,预加载等.wmv ├─Google Guava 第34讲-Guava Cache之RecordStats,CacheBuilderSpec详解.wmv

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值