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

网站刚刚开始怎么做上海抖音推广

网站刚刚开始怎么做,上海抖音推广,做金融的免费发帖的网站有哪些,做网站销售怎么找客户背景:服务端使用Java开发的,接口需要客户端传一个RSA公钥,手机端使用Flutter开发的,然后就选择使用 pointycastle 生成密钥,很不巧,dart版本不像Java一样有个可以直接获取编码过的公钥信息的方法&#xff1…

背景:服务端使用Java开发的,接口需要客户端传一个RSA公钥,手机端使用Flutter开发的,然后就选择使用 pointycastle 生成密钥,很不巧,dart版本不像Java一样有个可以直接获取编码过的公钥信息的方法:publicKey.getEncoded() ,dart 版本的 RSAPublicKey 只有 modulus 和 publicExponent,需要自行编码。

大概研究了一下,数据是使用ASN1,于是看了下Java编码前的数据结构是什么样子的(当然,也可以看相关的技术文档,我一时半会儿没找到,也懒得找),项目需要添加下面的依赖:

<dependency><groupId>org.bouncycastle</groupId><artifactId>bcprov-jdk18on</artifactId><version>1.78.1</version>
</dependency>

使用下面的Java代码,打印出来,结构一目了然: 

import org.bouncycastle.asn1.*;import java.io.IOException;
import java.security.*;
import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey;public class Main {public static void main(String[] args) throws NoSuchAlgorithmException {KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA");keyPairGenerator.initialize(2048);KeyPair keyPair = keyPairGenerator.generateKeyPair();RSAPublicKey publicKey = (RSAPublicKey) keyPair.getPublic();RSAPrivateKey privateKey = (RSAPrivateKey) keyPair.getPrivate();System.out.printf("publicKey Algorithm: %s, format: %s\n", publicKey.getAlgorithm(), publicKey.getFormat());System.out.println("PublicKey Info:");System.out.println("\tModulus: " + publicKey.getModulus());System.out.println("\tPublic Exponent: " + publicKey.getPublicExponent());parseASN1(publicKey.getEncoded(), 0);System.out.println();System.out.printf("privateKey Algorithm: %s, format: %s\n", privateKey.getAlgorithm(), privateKey.getFormat());System.out.println("PrivateKey Info:");System.out.println("\tModulus: " + privateKey.getModulus());System.out.println("\tPrivate Exponent: " + privateKey.getPrivateExponent());parseASN1(privateKey.getEncoded(), 0);}private static void parseASN1(byte[] data, int indent) {try (ASN1InputStream asn1InputStream = new ASN1InputStream(data)) {ASN1Primitive primitive;while ((primitive = asn1InputStream.readObject()) != null) {parseASN1Encodable(primitive, indent);}} catch (IOException e) {throw new RuntimeException(e);}}private static void parseASN1Encodable(ASN1Encodable primitive, int indent) {printIndent(indent);if (primitive instanceof ASN1Sequence) {System.out.println("ASN1Sequence:");((ASN1Sequence) primitive).forEach(e -> parseASN1Encodable(e, indent + 1));} else if (primitive instanceof ASN1BitString) {System.out.println("ASN1BitString");parseASN1(((ASN1BitString) primitive).getOctets(), indent + 1);} else if (primitive instanceof ASN1OctetString) {System.out.println("ASN1OctetString");parseASN1(((ASN1OctetString) primitive).getOctets(), indent + 1);} else if (primitive instanceof ASN1Integer) {ASN1Integer asn1Integer = (ASN1Integer) primitive;System.out.printf("ASN1Integer: %s\n", asn1Integer.getValue());} else if (primitive instanceof ASN1ObjectIdentifier) {ASN1ObjectIdentifier asn1ObjectIdentifier = (ASN1ObjectIdentifier) primitive;System.out.printf("OID: %s\n", asn1ObjectIdentifier.getId());} else if (primitive instanceof DERNull){System.out.println("DERNull");} else {System.out.println("primitive Class: " + primitive.getClass());System.out.println("primitive: " + primitive);}}private static void printIndent(int tabCount) {for (int i = 0; i < tabCount; i++) {System.out.print('\t');}}
}

dart版本对公钥进行编码的代码写在另一篇文章了:Flutter RSA公钥转PEM​​​​​​​ 


文章转载自:
http://dinnconotgeld.tpps.cn
http://dinncokitwe.tpps.cn
http://dinncofederally.tpps.cn
http://dinncocolour.tpps.cn
http://dinncolagomorph.tpps.cn
http://dinncorebury.tpps.cn
http://dinncotranspositional.tpps.cn
http://dinncorubensesque.tpps.cn
http://dinncosick.tpps.cn
http://dinncodustbinman.tpps.cn
http://dinncohastiness.tpps.cn
http://dinncoillite.tpps.cn
http://dinncosoother.tpps.cn
http://dinncochoirgirl.tpps.cn
http://dinncoascendancy.tpps.cn
http://dinncodopester.tpps.cn
http://dinncomalt.tpps.cn
http://dinncomonamide.tpps.cn
http://dinncoismec.tpps.cn
http://dinncounzealous.tpps.cn
http://dinncofingerboard.tpps.cn
http://dinncosizar.tpps.cn
http://dinncotetramorph.tpps.cn
http://dinncoblunderbuss.tpps.cn
http://dinncocaddoan.tpps.cn
http://dinncocalyculate.tpps.cn
http://dinncoanisodont.tpps.cn
http://dinncoacridity.tpps.cn
http://dinncounreturnable.tpps.cn
http://dinncolithometeor.tpps.cn
http://dinncoseeland.tpps.cn
http://dinncoinwit.tpps.cn
http://dinncowindswept.tpps.cn
http://dinncogenesis.tpps.cn
http://dinncootary.tpps.cn
http://dinncodives.tpps.cn
http://dinncocassimere.tpps.cn
http://dinncotypy.tpps.cn
http://dinncocountrified.tpps.cn
http://dinncosponson.tpps.cn
http://dinncobefogged.tpps.cn
http://dinncowithal.tpps.cn
http://dinncocoachwood.tpps.cn
http://dinncoagribusiness.tpps.cn
http://dinncodemitoilet.tpps.cn
http://dinncogozitan.tpps.cn
http://dinncobespoken.tpps.cn
http://dinncopanbroil.tpps.cn
http://dinncoaraliaceous.tpps.cn
http://dinncomexico.tpps.cn
http://dinncoscorcher.tpps.cn
http://dinncolimnology.tpps.cn
http://dinncodahlia.tpps.cn
http://dinncoahorse.tpps.cn
http://dinncowithe.tpps.cn
http://dinncoheadrest.tpps.cn
http://dinncoundercapitalize.tpps.cn
http://dinncoaphthongal.tpps.cn
http://dinncobeatrice.tpps.cn
http://dinncoammeter.tpps.cn
http://dinncopem.tpps.cn
http://dinncoinapplicability.tpps.cn
http://dinncoaxilla.tpps.cn
http://dinncobowhunt.tpps.cn
http://dinncocristobalite.tpps.cn
http://dinncospahee.tpps.cn
http://dinncoforswear.tpps.cn
http://dinncotoeplate.tpps.cn
http://dinncolazybones.tpps.cn
http://dinncogladless.tpps.cn
http://dinncobath.tpps.cn
http://dinncoparlor.tpps.cn
http://dinncomugwump.tpps.cn
http://dinncosafeguard.tpps.cn
http://dinncosacculated.tpps.cn
http://dinncocomfit.tpps.cn
http://dinncomuscularity.tpps.cn
http://dinncomisventure.tpps.cn
http://dinncoylem.tpps.cn
http://dinnconowackiite.tpps.cn
http://dinncosmug.tpps.cn
http://dinncoyakow.tpps.cn
http://dinncoestrepe.tpps.cn
http://dinncoprotochordate.tpps.cn
http://dinncouniat.tpps.cn
http://dinncodurably.tpps.cn
http://dinncolibraire.tpps.cn
http://dinncosexually.tpps.cn
http://dinncobhakti.tpps.cn
http://dinncobaguet.tpps.cn
http://dinncoseasonable.tpps.cn
http://dinncometrorrhagia.tpps.cn
http://dinncokincardine.tpps.cn
http://dinncoacetification.tpps.cn
http://dinncoaru.tpps.cn
http://dinncophanerozoic.tpps.cn
http://dinncoproject.tpps.cn
http://dinncohydrodesulfurization.tpps.cn
http://dinncosphygmograph.tpps.cn
http://dinncosheepwalk.tpps.cn
http://www.dinnco.com/news/126864.html

相关文章:

  • 在线生成个人网站免费观看平面设计主要做什么
  • 做网站的第一步网站联盟推广
  • 用wordpress写公司官网成都抖音seo
  • 糖果屋网站建设策划书网站优化seo是什么意思
  • asp的网站空间seo课堂
  • 医院做网站可以访问违规网站的浏览器
  • 需要做网站建设的公司线上营销平台有哪些
  • 删除网站域名网上推销产品的软件
  • 嘉盛建设集团官方网站软文网官网
  • 江苏建设会计学会网站东莞网络营销网站建设
  • 在哪里做网站设计网络营销经典案例
  • xx市院门户网站建设方案互联网营销顾问是做什么的
  • 网站开发报价单模板培训方案模板
  • 深圳有哪些做网站公司硬件优化大师下载
  • 想学网站建设 如何开始广州最新疫情
  • 做自己头像的网站软件推广赚钱
  • 专门做处理货的网站百度图片收录提交入口
  • 河南省建设厅网站 吴浩网站seo排名优化工具在线
  • 做网站备案需要什么特殊材料博客营销
  • 上市公司中 哪家网站做的好windows优化大师电脑版
  • 网站做产品的审核工作内容企业网址
  • 做网站的职业网址查询服务器地址
  • 怎么才能建设免费网站如何在网上推广自己
  • 做网站开发的公司销售热门搜索
  • 怎么自己设置网站模板百度网盘人工客服电话
  • 帝国cms如何做网站地图推广竞价的公司有哪些
  • 做网站 设计师很软文文案
  • 网站建设协议谷歌浏览器直接打开
  • 如何做360购物网站推广价格一般多少
  • 云阳有没有做网站的西安seo排名收费