开发者

Flex/Air: Sending data with a certificate

开发者 https://www.devze.com 2022-12-31 09:34 出处:网络
I need to send data from an Air application, using a certificate. This certificate is to be provided by the user through a USB Key.

I need to send data from an Air application, using a certificate. This certificate is to be provided by the user through a USB Key.

I've got a lot of questions regarding this.

  1. Is it possible to do what I'm looking for?
  2. If yes, is it possible to do that only with the Flex/Air sdk or should I use Java or some other language to load the certificate?
  3. Would anyone have a link where I can learn so开发者_如何学Gome more about this? I've been looking through the web, but haven't really found anything useful...


For the certificate stuff, you may take a look at the as3crypto library, which is doing an awesome work in implementing various cryptographic and security related algorithms in AS3. I've used this particular library to do data signing and verification, using an external X.509 certificate.

The implementation in this library is pretty straightforward, and you shouldn't be confused about it, if you are a little familiar with cryptography and the whole keys/signing/certificates world.

[Edit] If you are not, you might want to take a look at the Digital Signature page on Wikipedia, which is a pretty good introduction to this world. Also, because the AS3 implementation of RSA is quite slow, if you want to sign a large number of data, you may want to sign hash of the data instead of the real data. For the practical code to do this kind of stuff, there is some code sample in the demo of the library.

Also, as you mention that your certificate is coming from an USB drive, you should be aware that using AIR 2.0, you might be able to monitor plugging and unplugging of mass storage devices. That might be cool for your application.

0

精彩评论

暂无评论...
验证码 换一张
取 消