After a question on our flex forum about MD5 encryption, I decided to write an example about all the encryption types available in Flex.
Encryption is not available by default, you have to download the latest version of the (open source) project AS3corelib.
If you would like to encrypt a String with an MD5, you have the MD5 class in as3corelib-.92.1srccomadobecryptoMD5.as.
Import this class and than just call
1 |
MD5.hash("some string"); |
and there you go…
To show you every encryption method I’ve written this example.
Flex in HMAC with Your HMAC key as security key: 28df358053e410a65bae3d52a73ef921
Actionscript code: HMAC.hash("Flex","Your HMAC key");
Flex in MD5: 09d2bd168181f1e64c2b1651a80a8aa8
Actionscript code: MD5.hash("Flex");
Flex in SHA1: 6b1f893805e29582969095a741d60a5f43734af8
Actionscript code: SHA1.hash("Flex");
Flex in SHA224: c5e91507b9a0e573c6e93e5adec2de26c27545704e2f954db0c9fbd5
Actionscript code: SHA224.hash("Flex");
Flex in SHA256: c2a520b84ceea67ca4f3f74f908a5a310d104b42226714809b4e39de7eae2d24 Actionscript code: SHA256.hash("Flex");
'Flex' 카테고리의 다른 글
Flash Builder 4 Beta2에서 SVN 설치하기 (0) | 2010.10.18 |
---|---|
flex 다국어 (0) | 2010.10.01 |
HTTPService Parameters (0) | 2010.09.29 |
FLEX로 화면캡쳐 및 이미지파일로 저장하기 (0) | 2010.08.13 |
flex (0) | 2010.06.21 |