惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
DataBreaches.Net
T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
Know Your Adversary
Know Your Adversary
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
N
News and Events Feed by Topic
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Secure Thoughts
G
GRAHAM CLULEY
Google Online Security Blog
Google Online Security Blog
Help Net Security
Help Net Security
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
O
OpenAI News
Google DeepMind News
Google DeepMind News
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Security Archives - TechRepublic
Security Archives - TechRepublic
L
LINUX DO - 最新话题
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Stack Overflow Blog
Stack Overflow Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
Lohrmann on Cybersecurity
H
Hacker News: Front Page
W
WeLiveSecurity
P
Privacy International News Feed
Forbes - Security
Forbes - Security
月光博客
月光博客
PCI Perspectives
PCI Perspectives
T
Tailwind CSS Blog
N
News and Events Feed by Topic
T
Threat Research - Cisco Blogs
Engineering at Meta
Engineering at Meta
F
Full Disclosure
AI
AI
Hacker News - Newest:
Hacker News - Newest: "LLM"
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Darknet – Hacking Tools, Hacker News & Cyber Security
V
Visual Studio Blog
The Hacker News
The Hacker News
博客园 - 叶小钗
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
T
The Blog of Author Tim Ferriss

博客园 - 大侠(cer)

阿里巴巴又抄袭创业公司产品,这次已被告上法庭(一) 手机app传统邀请码安装与免邀请码安装区别,如何选择呢? 好用的一些开源系统 一个搞笑的招聘启事 mysql大数据表改表结构方案 android开发中监控android软件网络请求的软件Charles使用入门 android IOC框架学习记录 java分布式事务 android开发时使用游标时一定要关闭 今天发现ConcurrentHashMap的key是不区分大小写的 js方法isNaN使用时注意,“1.”这样子的东西他也会认为是数字 使用nginx+lua实现web项目的灰度发布 nginx增加lua支持 两台机器使用rsync同步数据(手工执行命令同步)(使用推的方式) 用户中心 - 博客园 ubuntu服务器配制jmagick环境 windows中架设基于Apache的svn服务器 amoeba学习 CentOS安装thrift
java和android及IOS对接RSA加密经验
大侠(cer) · 2014-02-20 · via 博客园 - 大侠(cer)

1.网上找的java生成RSA密钥对的例子,产生的字附串实际上是hax后和密钥串

你可以将他们当成静态字附串存在java代码里

2.android和java可以代码复用,IOS对接比较麻烦

3.IOS接RSA时,可以使用.der的公钥文件

4.通过java生成的私钥字附串生成IOS需要的.der公钥步骤如下

a.将私钥字附串反hax得到byte[]

b.将byte[] base64得到字附串以下面的格式存入private_key.pem内(记住,中间那串才是base64生成的东西,且整个过程中,不要将byte数组转成字附串)

-----BEGIN RSA PRIVATE KEY-----

308189028181009EEF0CDA83B2FF51C83EC2374BD7C0B6412AF6165471BDA22AEB99295D4549823968A4F3C31EF
1A9EBBF8B572360B53456E793A0B5A3A70CD6491EA844125D0DC349D1CE38F9A84EF1CDC0647E0B61491EEB8B47
C60FADA22BA22F03A50CC9977A9576AD26D1799F9436E819DF828A36FACFEA15AD6B59F4A2ACB2223682584B020
3010001

-----END RSA PRIVATE KEY-----

c.安装openssl

d.执行命令:openssl req -new -out cert.csr -key private_key.pem

e.执行命令:openssl x509 -req -in cert.csr -out public_key.der -outform der -signkey private_key.pem -days 3650

f.得到的public_key.der就是ios要的东西