AS3 Air应用与HMACSHA512加密 [英] AS3 Air App with HMACSHA512 Encryption

查看:180
本文介绍了AS3 Air应用与HMACSHA512加密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Air App,它需要通过使用HMACSHA512加密标准的http api对消息进行身份验证和签名。

Hi I'm developing an Air App that requires authentication and signing of messages via a http api using the HMACSHA512 Encryption standard.

我找到了一个AS3库它在 https://github.com/rubo/flame 查看货物,但它已经准备好了flex和我有很多麻烦,试图让它在Air / Flash IDE下工作和/或提取我需要的核心功能。

I've found an AS3 library which looks the goods at https://github.com/rubo/flame but its been prepared for flex and I've had a lot of trouble trying to get it to work under Air/Flash IDE and/or extracting the core functions I need.

如果有人可以帮助我通过Flash IDE加载火焰库/ swc,并使用工作简单的示例代码来加密消息hello,如...

It would be fantastic if someone could help me getting the flame library / swc loaded via the flash IDE with workine simple example code for encrypting the message 'hello' something like...

import flame.crypto.HMACSHA512;
var test:HMACSHA512 = new HMACSHA512(ByteArrayUtil.fromHexString('mySecretKey'));
trace('encrypted output = ' + test.encryptString('hello'));

提前感谢

推荐答案

由于actioncript和基于ECMAScript的javascript,您可以随时(并且几乎总是很容易)从JavaScript中移植一些东西。
例如实现加密算法。

Since actionscript and javascript based on ECMAScript, you can always(and almost always easily) port something from javascript. For example implementation of encryption algorithm.

但是!有人已经这样做了。 看看

But! Someone had this already done. SEE HOW

这篇关于AS3 Air应用与HMACSHA512加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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