How to calculate CRC checksum in Actionscript 3?

2019-08-29 06:28发布

I am developing an application in flex in which I need to calculate checksum of different files. I would like to know if there is a direct method in actionscript to calculate that or do I have to go for any external libraries?

Thanks in advance :)

3条回答
ゆ 、 Hurt°
2楼-- · 2019-08-29 06:58

as3corelib maintained by Mike Chambers/Adobe, contains everything you probably need in its crypto section including:

  • HMAC
  • MD5
  • MD5Stream
  • SHA1
  • SHA224
  • SHA256
  • WSSEUsernameTocken
查看更多
等我变得足够好
3楼-- · 2019-08-29 07:11

how do you use this as3corelib to perform a md5 on a file i.e. "c:\documents and settings\all user\desktop\demofile.xml" in php and c# you can md5files and get the checksum of the file - i also use md5summer to see if the outputted md5 is correct php and visual c# output the correct md5 however i cant find any easy tut that explains how to do this using flex / air / as3 nothing - i have imported the followinng libs.

import com.adobe.crypto.HMAC; import com.adobe.crypto.MD5; import com.adobe.crypto.SHA1; import com.adobe.crypto.SHA224; import com.adobe.crypto.SHA256; import com.adobe.crypto.MD5Stream;

i would have though that it would be md5stream be googling this turns up nought - please any help on how to do a simple md5 checksum of a local file would be great!!

查看更多
三岁会撩人
4楼-- · 2019-08-29 07:14
登录 后发表回答