摘要:import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; public class MD5 { public MD5() { md5Init(); retu... 阅读全文
posted @ 2018-08-02 14:22 yi点黑暗 阅读(844) 评论(0) 推荐(0) 编辑
摘要:import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESedeKeySpec; import javax.crypto.spec.IvParameterSpec; impo... 阅读全文
posted @ 2018-08-02 14:17 yi点黑暗 阅读(57) 评论(0) 推荐(0) 编辑
摘要:import java.security.MessageDigest; public class SHA1 { private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f 阅读全文
posted @ 2018-08-02 14:15 yi点黑暗 阅读(132) 评论(0) 推荐(0) 编辑
摘要:import org.apache.commons.codec.binary.Base64; import javax.crypto.Cipher; import java.security.Key; import java.security.KeyFactory; import java.security.spec.PKCS8EncodedKeySpec; import java.securi... 阅读全文
posted @ 2018-08-02 14:13 yi点黑暗 阅读(136) 评论(0) 推荐(0) 编辑
摘要:import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.d... 阅读全文
posted @ 2018-08-02 14:09 yi点黑暗 阅读(60) 评论(0) 推荐(0) 编辑
摘要:import com.sun.image.codec.jpeg.JPEGCodec; import com.sun.image.codec.jpeg.JPEGImageEncoder; import javax.imageio.ImageIO; import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; ... 阅读全文
posted @ 2018-08-02 14:07 yi点黑暗 阅读(93) 评论(0) 推荐(0) 编辑
摘要:import org.apache.commons.codec.binary.Base64; import java.io.*; public class Img2Base64Util { /** * 将图片转换成Base64编码 * @param imgFile 待处理图片 * @return */ public static S... 阅读全文
posted @ 2018-08-02 14:04 yi点黑暗 阅读(103) 评论(0) 推荐(0) 编辑
摘要:import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; imp... 阅读全文
posted @ 2018-08-02 13:59 yi点黑暗 阅读(214) 评论(0) 推荐(0) 编辑
摘要:import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.DESKeySpec; import java.security.NoSuchAlgorithmException; public class DESC... 阅读全文
posted @ 2018-08-02 13:53 yi点黑暗 阅读(224) 评论(0) 推荐(0) 编辑
摘要:import java.io.UnsupportedEncodingException; public class Base64Utils { private static char[] base64EncodeChars = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', &# 阅读全文
posted @ 2018-08-02 11:07 yi点黑暗 阅读(4169) 评论(0) 推荐(0) 编辑