使用Javascript数字签名 [英] Digital signature with Javascript

查看:969
本文介绍了使用Javascript数字签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我坚持这个问题:

So I'm stuck with this problem:

和我有这样的小程序是用于的数字签名

and I have this applet that is used for digital signature,

这个想法是提取在客户端的,那样的私钥永远不会离开客户端的计算机,的KEY文件中的私钥的为安全下,它不能避免:(要求

the idea is to extract the private key from the KEY file in the client side, in that way the private key never leaves the client's computer, that is a requirement for security, it can't be avoid :(

我在寻找的API或框架,但我不能找到一种方法来解决这个问题,

I'm looking for APIs or frameworks, but I can't found a way to solve this,

使用 jsrsasign 例子使用了PEM文件,但我的用户有.CER + .KEY +密码在Java中我能做到这一点,但我需要做的是在JavaScript或的东西的客户端上。

with jsrsasign the examples uses a PEM file but my users have .CER + .KEY + password, in java I can do it, but I need to do it in javascript or in something on the client side.

和,读网络加密API 一些的范例我发现,它们所产生的 NEW 的公钥和私钥签名,但他们从来不看现有的证书

and, reading the Web Cryptography API and some examples I found, they generate NEW private and public keys to sign BUT they never READ an existing CERTIFICATE

没有任何人有这个问题,或者知道一个框架,我可以使用?
请heeeelp!

does anybody have this problem or know a framework I could use? please heeeelp!

推荐答案

因此​​,答案是使用JSRSASIGN( HTTP ://kjur.github.io/jsrsasign/ )在它使用PEM文件张贴在GitHub上的例子,我建立使用CER + KEY +密码>>的 https://github.com/alfredomova/firmaJs-with-jsrsasign-example

So the answer was to use JSRSASIGN (http://kjur.github.io/jsrsasign/) in the examples posted in github it uses PEM files, I build an example to use CER+ KEY + PASSWORD >> https://github.com/alfredomova/firmaJs-with-jsrsasign-example,

对于我使用sparkMD5具体例子( https://github.com/satazor/SparkMD5 )计算文件的哈希值。

for that specific example i used sparkMD5(https://github.com/satazor/SparkMD5) to calculate the file's hash.

这篇关于使用Javascript数字签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆