随笔分类 -  加密

摘要:import java.nio.charset.StandardCharsets; import java.util.Base64; public class Base64Example { public static void main(String[] args) { String origin 阅读全文
posted @ 2024-09-20 10:54 tonggc1668 阅读(82) 评论(0) 推荐(0)
摘要:import java.security.GeneralSecurityException; import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; import com.citi.simpliciti.tempest.TempestRuntimeException; public class AdvancedE... 阅读全文
posted @ 2018-05-10 17:33 tonggc1668 阅读(127) 评论(0) 推荐(0)
摘要:import org.apache.commons.codec.binary.Base64; 阅读全文
posted @ 2017-12-14 18:56 tonggc1668 阅读(4286) 评论(0) 推荐(0)
摘要:public class DataHandleHelper { public static String encryptConsignee(Object consignee){ String con = ""; if(StringUtil.isNotBlank(String.valueOf(consignee))){ co... 阅读全文
posted @ 2017-08-18 09:44 tonggc1668 阅读(135) 评论(0) 推荐(0)
摘要:import org.apache.commons.codec.binary.Base64;import org.apache.commons.codec.digest.DigestUtils; 阅读全文
posted @ 2017-08-15 09:45 tonggc1668 阅读(134) 评论(0) 推荐(0)
摘要:import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.MessageDigest; public class MD5WLBUtil { public static byte[] md54wlb(final byte[... 阅读全文
posted @ 2017-06-30 09:41 tonggc1668 阅读(161) 评论(0) 推荐(0)
摘要:import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import com.yundaex.common.crypto.WrappedNoSuchAlgorithmException; public class MD5Utils { /** * md5加密方法... 阅读全文
posted @ 2017-06-29 16:29 tonggc1668 阅读(202) 评论(0) 推荐(0)
摘要:import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOut 阅读全文
posted @ 2017-03-13 09:46 tonggc1668 阅读(4013) 评论(0) 推荐(0)
摘要:import java.io.UnsupportedEncodingException; import org.apache.commons.codec.binary.Base64; public class RC4 { public static void main(String[] args) { String msg = "abcd"; Stri... 阅读全文
posted @ 2017-02-23 17:08 tonggc1668 阅读(252) 评论(0) 推荐(0)
摘要:String result = new String(Base64.encodeBase64(DigestUtils.md5(str.getBytes("UTF-8"))),"UTF-8"); System.out.println(result); 阅读全文
posted @ 2017-02-23 16:59 tonggc1668 阅读(384) 评论(0) 推荐(0)