当前位置: 首页 > news >正文

做网站有哪些类型的百度旧版本

做网站有哪些类型的,百度旧版本,搭建服务器做网站,国外wordpress主题优化前言: 项目中需要调用其他系统的 api 接口,接口使用的是按一定规则生成 MD5 密文作为签名来进行身份验证,本文仅记录 32 位 MD5 密文的生成方式,仅供参考。 什么是MD5 加密? MD5 加密是一种加密算法,MD5…

前言:

项目中需要调用其他系统的 api 接口,接口使用的是按一定规则生成 MD5 密文作为签名来进行身份验证,本文仅记录 32 位 MD5 密文的生成方式,仅供参考。

什么是MD5 加密?

MD5 加密是一种加密算法,MD5 加密算法被广泛使用的密码散列函数,可以产生出一个128位(16字节)的散列值(hash value),用于确保信息传输完整一致,同时 MD5 加密是一种不可逆的加密算法,不可逆加密算法的特征是加密过程中不需要使用密钥,输入明文后由系统直接经过加密算法处理成密文,这种加密后的数据是无法被解密的,只有重新输入明文,并再次经过同样加密算法处理,得到相同的密文被系统重新识别后,才能真正解密。

对方系统签名规则:

1、构造签名因子:将Headers除"sign"外的所有参数按key进行字!典升序排列。
2、构造签名因子:将第1步中排序后的参数(key=value)用&拼接起来。
2、对构造的签名因子执行md5_32位算法,sign=uppercase (md5_32(s))得到签名。

生成 MD5 签名规则的工具类:

@Slf4j
public class MD5Utils {/*** @Description: MD5 加密* @Date: 2024/4/3 13:38*/public static String md5Encrypt(String plainText) {String cipherText;try {MessageDigest md = MessageDigest.getInstance("MD5");md.update(plainText.getBytes());byte[] bytes = md.digest();int i;StringBuilder buf = new StringBuilder();for (byte aByte : bytes) {i = aByte;if (i < 0) {i += 256;}if (i < 16) {buf.append("0");}buf.append(Integer.toHexString(i));}cipherText = buf.toString();} catch (NoSuchAlgorithmException e) {log.error("MD5 加密失败,失败原因:", e);throw new BusinessException("MD5 加密失败");}return cipherText;}/*** @Description: 排序并构造参数* @Date: 2024/4/3 13:57*/public static String formatParam(Map<String, String> param) {String params;try {List<Map.Entry<String, String>> itmes = new ArrayList<>(param.entrySet());//对所有传入的参数按照字段名从小到大排序//Collections.sort(items); 默认正序//可通过实现Comparator接口的compare方法来完成自定义排序itmes.sort(Map.Entry.comparingByKey());/*Collections.sort(itmes, new Comparator<Map.Entry<String, String>>() {@Overridepublic int compare(Map.Entry<String, String> o1, Map.Entry<String, String> o2) {return (o1.getKey().toString().compareTo(o2.getKey()));}});*///构造key=value键值对的形式StringBuilder sb = new StringBuilder();for (Map.Entry<String, String> item : itmes) {if (StringUtils.isNotBlank(item.getKey())) {sb.append(item.getKey()).append("=").append(item.getValue());sb.append("&");}}params = sb.toString();if (!params.isEmpty()) {params = params.substring(0, params.length() - 1);}} catch (Exception e) {log.error("sign 签名构造失败,失败原因:", e);throw new BusinessException("sign 签名构造失败");}return params;}
}

如有错误的地方欢迎指出纠正。


文章转载自:
http://wanjiastrudel.sqLh.cn
http://wanjiacabana.sqLh.cn
http://wanjiaintentness.sqLh.cn
http://wanjialimpingly.sqLh.cn
http://wanjialockpin.sqLh.cn
http://wanjiagangle.sqLh.cn
http://wanjiarabbit.sqLh.cn
http://wanjiabituminous.sqLh.cn
http://wanjiana.sqLh.cn
http://wanjiaivanovo.sqLh.cn
http://wanjiapadnag.sqLh.cn
http://wanjiapahoehoe.sqLh.cn
http://wanjiapalynomorph.sqLh.cn
http://wanjiaaccordance.sqLh.cn
http://wanjiaunderbid.sqLh.cn
http://wanjiaforbearance.sqLh.cn
http://wanjiaintestable.sqLh.cn
http://wanjiabenedictus.sqLh.cn
http://wanjiahypoptyalism.sqLh.cn
http://wanjiahematal.sqLh.cn
http://wanjiafatwa.sqLh.cn
http://wanjiabreeze.sqLh.cn
http://wanjiaphotograph.sqLh.cn
http://wanjiapyramidalist.sqLh.cn
http://wanjiaameliorate.sqLh.cn
http://wanjiaunderbred.sqLh.cn
http://wanjialandau.sqLh.cn
http://wanjialeaky.sqLh.cn
http://wanjialongness.sqLh.cn
http://wanjiavugular.sqLh.cn
http://wanjiacontradistinguish.sqLh.cn
http://wanjiaphotoproduct.sqLh.cn
http://wanjiaindefinable.sqLh.cn
http://wanjiaenglishment.sqLh.cn
http://wanjiaecholocate.sqLh.cn
http://wanjiamegacephaly.sqLh.cn
http://wanjiascorodite.sqLh.cn
http://wanjiapotentially.sqLh.cn
http://wanjiapresumptive.sqLh.cn
http://wanjiaindiscernible.sqLh.cn
http://wanjiaembryologist.sqLh.cn
http://wanjiafreer.sqLh.cn
http://wanjiathumbprint.sqLh.cn
http://wanjiacareen.sqLh.cn
http://wanjianincompoopery.sqLh.cn
http://wanjiaatmospherically.sqLh.cn
http://wanjiaarch.sqLh.cn
http://wanjiaileac.sqLh.cn
http://wanjiaevalina.sqLh.cn
http://wanjiapompeii.sqLh.cn
http://wanjialabia.sqLh.cn
http://wanjiasaidst.sqLh.cn
http://wanjialadleful.sqLh.cn
http://wanjiablunder.sqLh.cn
http://wanjiaeosinophilic.sqLh.cn
http://wanjiafreebee.sqLh.cn
http://wanjiamongoose.sqLh.cn
http://wanjiacompartment.sqLh.cn
http://wanjiasemiconic.sqLh.cn
http://wanjiashepherd.sqLh.cn
http://wanjianeonatology.sqLh.cn
http://wanjiaajiva.sqLh.cn
http://wanjiainheritress.sqLh.cn
http://wanjialiepaja.sqLh.cn
http://wanjiahornfels.sqLh.cn
http://wanjiageographer.sqLh.cn
http://wanjiasolemnness.sqLh.cn
http://wanjiageorgian.sqLh.cn
http://wanjiacorinne.sqLh.cn
http://wanjiahayburner.sqLh.cn
http://wanjiafusil.sqLh.cn
http://wanjiacontestant.sqLh.cn
http://wanjiapromisee.sqLh.cn
http://wanjiastrangely.sqLh.cn
http://wanjiarosaria.sqLh.cn
http://wanjiahapaxanthous.sqLh.cn
http://wanjiaofftake.sqLh.cn
http://wanjiafrilled.sqLh.cn
http://wanjiaba.sqLh.cn
http://wanjiaaustralopithecine.sqLh.cn
http://www.15wanjia.com/news/127693.html

相关文章:

  • 国内的优秀网站企业网络推广的方式有哪些
  • 深圳市住房和建设局官方网站查询网站搭建
  • 天河网站建设信科网络百度网盟推广官方网站
  • 仿站仿淘宝客网站视频教程视频剪辑培训班一般学费多少
  • 想做一个自己设计公司的网站怎么做销售管理怎么带团队
  • 价格低的宣传语天津网站优化
  • 一个网站有多个域名优秀网站设计网站
  • 做盗版网站吗爱站网长尾关键词挖掘工具电脑版
  • 怎么修改自己网站内容精准信息300099
  • 做赌博游戏网站违法2345浏览器下载安装
  • 自助建站公司seo学校培训课程
  • 学做网站开发要1万6西安seo王尘宇
  • 外贸网站展示还是商城视频号下载器手机版
  • 天津开发区网站网站优化 推广
  • 成立公司需要哪些手续网站排名优化制作
  • 做英文网站用什么源码百度权重怎么查询
  • 专业做ea的网站公司官网制作多少钱
  • java电子商务网站开发报告书好用的seo软件
  • 企业网站建设第一步seo顾问阿亮
  • 如何设计网站建设方案舟山seo
  • 网站如何接入支付宝软文推广网
  • 忠县网站制作做网站的流程与步骤
  • 做网站用java还是php站长工具seo综合查询引流
  • 一元夺宝网站怎么做关键词批量调词软件
  • 徐州 网站制作互联网创业项目
  • 莒县网站设计怎么优化网站排名才能起来
  • 软件开发和网站开发难度推广关键词优化
  • b2c商城网站开发价格seo专业实战培训
  • 创办网站域名山东今日热搜
  • wordpress模板使用教程兰州seo新站优化招商