[펌]http://drawlogic.com/2008/02/18/as3-cryptography-libraries/
AS3 Cryptography and Hashing Libraries for Encryption and Security (crypto)
February 18, 2008 — drawkAS3 libraries for crypto are pretty robust from the new RAW POWER in the AVM2 virtual machine that runs flash9/as3, cryptography, like compression, is very processor intensive and needs a fair amount of power to be worth the time (usually a balancing mechanism). I am working on a few security apps in AIR and Flash9 for a project and a product so this is the best of what I have found to share. I will be sure to post here when these projects are complete.
There are two that are pretty good as3 kits that have decent support for crypto and hashing, actually as3crypto is quite broad in their support or most common crypto algorithms, even hashing support up to SHA-256 and ciphers 3DES, AES, RC4.
This is not really a comparison just some kits that have tools you might need. as3crypto is definitely the way to go for more heavy ecryption with common ciphers, but if you are just hashing some text as3corelib might work for your project. as3corelib is a more broad toolkit that is made or sponsored by Adobe that has JSON, RSS, support and other tools. It is a great core lib, but not as deep in the encryption area. I am actually using both in the stuff I am working on, as3corelib for some other uses (JSON,RSS) and as3crypto for all encryption and hashing.
The two are:
- as3corelib
- Open source
- Support for hashing algorithms only.
- Browse source
- as3crypto
- Robust, broad encryption and security support
- Open source
- Demo
- Browse source
- Broad support of algorithms
-
-
TLS 1.0 support, exposed through TLSSocket and TLSEngine classes
-
X.509 Certificate support, including parsing, and validation
-
built-in list of common root Certificate Authorities
-
symmetric ciphers: AES, Blowfish, DES, 3DES, XTEA, RC4
-
confidentiality modes: CTR, CBC, CFB, CFB-8, OFB, ECB
-
public key crypto: RSA (encryption, decryption, signing, verifying and key generation)
-
padding: PKCS#1 (type 1 and 2), PKCS#5
-
BigInteger library
-
hashing function: SHA-256, SHA-224, SHA-1, MD5, MD2
-
HMAC support
-
prng: TLSPRF and stream-cypher-based PRNG.
-
minimal ASN-1/DER support for PEM key parsing and X-509 cert parsing
-
Crypto - Shortcut class to access many classes above.
-
Hex, Base64 - Static methods to convert binary data to and from text formats
-
-
As3 Crypto is a cryptography library written in Actionscript 3 that provides several common algorithms, as well as TLS 1.0 support. The library is offered under the BSD license, and include several derivative works from Java, C and javascript sources.
