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

太仓做网站的公司企业公司网站

太仓做网站的公司,企业公司网站,网站程序开发后怎么上线,可以做翻译任务的网站曾经试图在Java和OpenJDK中使用椭圆曲线密码术 #xff08;ECC#xff09;的每个人要么被迫使用Bouncy Castle#xff0c;要么被SunEC提供者弄糊涂了 。 SunEC提供程序根据文档 #xff08;报价#xff09;提供以下算法#xff1a; AlgorithmParameters 欧共体 KeyAgr… 曾经试图在Java和OpenJDK中使用椭圆曲线密码术 ECC的每个人要么被迫使用Bouncy Castle要么被SunEC提供者弄糊涂了 。 SunEC提供程序根据文档 报价提供以下算法 AlgorithmParameters 欧共体 KeyAgreement ECDH KeyFactory 欧共体 KeyPairGenerator 欧共体 Signature ECDSA没有 SHA1withECDSA SHA256withECDSA SHA3​​84withECDSA SHA512withECDSA 不幸的是OpenJDK并未附带该提供程序。 但是任何真正想尝试Java内置ECC功能的人都可能会尝试将sunec.jar包含提供程序简单地添加到jre / lib / ext /文件夹中。 但是当尝试使用提供程序时这些家伙一定会惊讶地擦着眼睛。 事情与刚开始时看起来不一样... 假设我们将库添加到了正确的文件夹中我们的OpenJDK注意到了它并且我们可以成功地编译以下代码而没有任何例外 package eccprovidertest;import java.security.Provider; import java.security.Provider.Service; import java.security.Security; import sun.security.ec.SunEC;/*** ECC Provider Test.* author Christopher Meyer - christopher.meyerrub.de* version 0.1* Oct 23, 2013*/ public class ECCProviderTest {/*** param args the command line arguments*/public static void main(final String[] args) {Provider sunEC new SunEC();Security.addProvider(sunEC);for(Service service : sunEC.getServices()) {System.out.println(service.getType() : service.getAlgorithm());}}} 如果最终使用OpenJDKJava版本“ 1.7.0_25”运行它则会得到以下输出 KeyFactory: EC AlgorithmParameters: EC 哇 这不是一个非常有用的提供程序.....承诺的算法在哪里 让我们尝试使用Oracle JDK来运行代码只是为了好玩 KeyFactory: EC AlgorithmParameters: EC Signature: NONEwithECDSA Signature: SHA1withECDSA Signature: SHA256withECDSA Signature: SHA384withECDSA Signature: SHA512withECDSA KeyPairGenerator: EC KeyAgreement: ECDH 惊喜惊喜 那是您开始揉眼睛的时刻 这里是算法但是为什么仅在使用Oracle JDK时才可用 这样做的原因隐藏在提供程序的代码中。 以下几行摘自sun.security.ec.SunEC private static final long serialVersionUID -2279741672933606418L;// flag indicating whether the full EC implementation is present // (when native library is absent then fewer EC algorithms are available) private static boolean useFullImplementation true; static {try {AccessController.doPrivileged(new PrivilegedAction() {public Void run() {System.loadLibrary(sunec); // check for native libraryreturn null;}});} catch (UnsatisfiedLinkError e) {useFullImplementation false;} }public SunEC() {super(SunEC, 1.7d, Sun Elliptic Curve provider (EC, ECDSA, ECDH));// if there is no security manager installed, put directly into// the provider. Otherwise, create a temporary map and use a// doPrivileged() call at the end to transfer the contentsif (System.getSecurityManager() null) {SunECEntries.putEntries(this, useFullImplementation);} else {MapObject, Object map new HashMapObject, Object();SunECEntries.putEntries(map, useFullImplementation);AccessController.doPrivileged(new PutAllAction(this, map));} } 此外在将某些条目添加到列表之后可以在SunECEntries类中找到以下内容 /** Register the algorithms below only when the full ECC implementation* is available*/ if (!useFullImplementation) {return; } 好的这说明了行为。 仅当可以成功加载本机库Windows计算机上的libsunec.so或sunec.dll时才存在算法。 在我们的情况下显然缺少该库因为我们仅复制了sunec.jar文件。 不幸的是如果我们阅读了提供者文档我们将了解以下内容 “ […] Java类打包到JRE扩展目录中已签名的sunec.jar中而C 和C函数打包到JRE本机库目录中的libsunec.so或sunec.dll中。 如果不存在本机库则该提供者已注册为支持较少的ECC算法省略了KeyPairGeneratorSignature和KeyAgreement。” 不幸的是这是我们自己急于采取的行动这浪费了我们宝贵的开发时间。 摘自有时候阅读JavaDocs确实很有帮助……。 但不像调试工作那样富有教育意义。 参考 Java安全和相关主题博客中的JCG合作伙伴 Christopher Meyer的如何将ECC与OpenJDK结合使用 。 翻译自: https://www.javacodegeeks.com/2013/10/how-to-use-ecc-with-openjdk.html
http://www.pierceye.com/news/508817/

相关文章:

  • 网站建设费在会计上怎么入账做学校网站的目的
  • 常德网站建设设计下载百度安装
  • 站长平台有哪些广东东远建设工程管理有限公司网站
  • 做蓝牙app的网站跨境电商是不是坑
  • 电子商务网站开发 刘兰娟企业网站建设发展平台
  • 天津做网站得公司游戏界面设计网站
  • 手机网站制作推广网站开发制作培训学校
  • 网站建设需要哪些成本自媒体怎么赚钱
  • 手机怎么访问微网站网站建设市场调研框架
  • 前端网站主题怎么做业务外包的优势和劣势
  • 西安模板网站建设套餐保定seo排名外包
  • 自己做的网站怎么设置文件下载北京朝阳区楼盘
  • h网站建设揭阳网站如何制作
  • phpstudy建设网站教程微信小程序开发需要什么
  • 快手刷评论推广网站网站几个数据库
  • 山东网站建设网站我国网站开发
  • 常见的网站类型有北京电力建设公司待遇
  • 网站分析流程wordpress表单统计插件下载
  • 南宁网站建设公司seo优化武鸣住房和城乡规划建设局网站
  • 在线制作网站门户站模板
  • 邵阳网站建设推广56m做图片视频的网站是什么
  • 如何提高网站的点击率域名空间网站推广
  • 上海松江做网站建设wordpress 拒绝连接
  • 有免费的个人网站吗富德生命人寿保险公司官方网站保单服务
  • 网站备案 子域名网页视频制作软件
  • 空间 网站网站建设哪个好
  • 公司网站域名价格云南免费网站建设
  • 网站跳转域名不变常见网站架构
  • 山东省建设厅电工证查询网站网站标题的选择
  • 网站建设是属于软件吗电话销售哪里找客户电话