Question

As mentioned by the title, I would like to find an implementation for HMAC-SHA-512 written for ActionScript. I was able to find a library that provide HMAC-SHA-256 with other functions, however, I am looking for HMAC-SHA-512 specifically.

Thank you

Edit:

Or, since actionscript and javascript have the same origin, can some one port this javascript version into actionscript?

http://pajhome.org.uk/crypt/md5/sha512.html

Edit 2:

I already ported the code from javascript to actionscript. The code can be found in one of the answers in this question Porting SHA-512 Javascript implementation to Actionscript

Was it helpful?

Solution

The implementation you link to doesn't seem to be using any features that aren't supported by ActionScript 3. Just surround the whole thing with public class SHA512 { }, and prefix the first five functions with public.

Edit: You will also need to convert function int64 to it's own class (or possibly use Number, though I'm not sure if you will lose precision for 64-bit integers).

OTHER TIPS

Checkout this library: http://code.google.com/p/as3crypto/

Though only does: SHA-256,SHA-224,SHA-1,MD5, and MD2

So I guess that doesn't answer your question.

But best Crypto library for actionscript I've seen.

Just found all of SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512) implemented at http://code.google.com/p/flame/. Also it provides HMAC implementation. Didn't try it yet but looks what you're looking for.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top