Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MD5 in ActionScript

I am trying to build a web based flash application. I am quite new to flash. I would like to develop it in two forms - demo and paid version. For this application to act as a paid version I need to have some kind of serial key. In order to achieve this I googled and came across something like this

MD5(MD5(thisuri)+thisuri)

I think 'thisuri' points to the current url page but I don't know how to get that url and I don't know whether '+' acts as a character or an operator.

Can you please help me?

like image 431
om sai Avatar asked Sep 10 '26 15:09

om sai


1 Answers

It seems that a library exists in AS3.0 : as3corelib

An ActionScript 3 Library that contains a number of classes and utilities for working with ActionScript? 3. These include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs.

To use it, just download the zip file, decompress it and copy the contents of "src" directory to the root of your project. Then in your actionscript code, simply do the following :

import com.adobe.crypto.MD5;
var hash:String = MD5.hash(”test”);

source in french

like image 118
Julien Avatar answered Sep 13 '26 20:09

Julien



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!