MD5 in ActionScript

11,269

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

Share:
11,269
om sai
Author by

om sai

Updated on June 04, 2022

Comments

  • om sai
    om sai almost 2 years

    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?