依赖于java.security.MessageDigest,支持MD5,SHA-1,SHA-256 import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; /** * CiphertextUtil * * @author ysj */ public class CiphertextUtil { public static final String MD5 = "MD5"; p
首先我们要明白 Codec 是什么含义.它是 Coder + decoder = Codec,也就是编码器解码器.即是编码器,也是解码器. 官网地址:http://commons.apache.org/proper/commons-codec/ Apache Commons Codec (TM) software provides implementations of common encoders and decoders such as Base64, Hex, Phonetic and U
下载地址:http://commons.apache.org/proper/commons-codec/download_codec.cgi import org.apache.commons.codec.binary.Base64; /** * Created by yster@foxmail.com * 2018年4月9日 下午10:17:09 */ public class JdkBase64 { public static void main(String[] args) { Strin