BufferedReader readLine

import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;


InputStream inputStream= System.in; Reader reader=new InputStreamReader(inputStream); BufferedReader br=new BufferedReader(reader) ; while((str=br.readLine())!=null){ String result = new String(Base64.encodeBase64(DigestUtils.md5(str.getBytes("UTF-8"))),"UTF-8"); System.out.println(result); } br.close();

 

posted @ 2017-08-15 09:45  tonggc1668  阅读(128)  评论(0编辑  收藏  举报