|
Flash Business Tools provides
several encryption and compression algorhithms that are completely compatible with server-side implementations of the same. They are implmented as static classes so that they can be used anywhere in your project without requiring instances. Flash Business
Tools also provides localization support, with a Locale class
that developers can use in their applications to format numbers,
dates, currencies, and collation lists. These classes may be
instantiated with as little as a single line of code, and used
to encrypt data for safe transport across the internet or to convert
number values or Flash Date objects into properly formatted
strings, using the locale's native language, character set,
and formats, as well as "unformatting" those values
back into numbers or Flash Date objects.
All of these classes are configurable so that you can match the specific server-side implementation that you need (character sets, block sizes, number of iterations, etc). |
| Features |
- Encryption
- Triple DES - This encryption algorithm is a standard across platforms and is completely compatible with server-side implementations of the same algorhithm. This class also contains the code for prior versions of DES and has the ability to encrypt different data types, but the exposed encrypt() method does hex-based Triple DES out of the box, which is the most common use on the web.
- XXTEA - The newest and most up to date TEA algorithm for fast and simple text encryption. This class requires no understanding of encryption concepts, you simply need a key and some text to encrypt or decrypt, and the class file does the rest.
- MD5 - MD5 is the most commonly used algorhithm for encrypting passwords before sending them across the internet. Combine the password with a key to breate a hash before sending, and store only the hashed password in your database for comparison for maximum security.
- Other algorithms will be added in future releases.
- Compression
- gz text - this is the standard compression implemented by all the major browsers and server platforms, and can be used to reduce and obfuscate data sent between the client and server.
- RLE text - This is a simple run length encoding algorhithm, which can be used to reduce the size of blocks of text for transport and storage. Block size is variable so that it can be optimized for certain types of data. Sometimes with RLE algorhithms the compressed output is actually larger than the original data, so this class contains a "smart comparison" that ensures that the compressed data is smaller than the original, and uses the smaller of the two in the output.
- Other algorithms will be added in future releases.
- Localization
- Number formatting - You may not think about it very often, but not everyone uses the same characters as seperators in numbers. In the US, we use a comma as a thousands separator and a period as a decimal seperator, but in many countries they use commas as a decimal separator and spaces, periods, or even apostrophes as a thousand separator. If you want to show your users numbers in a format they can easily understand, this class will take any number, integer or floating point, and convert it to a locale formatted string. It will also take those strings and convert them back into numbers for you so that you can perform calculations on them.
- Currency formatting - In addition to the thousand and decimal separator differences between locales, this class also stores and makes available the proper currency codes (e.g. "USD" or US Dollars, "CAD" or Canadian Dollars, etc) and symbols (e.g. "$", "£", "€", "¥"), as well as storing information like the number of digits after the decimal, position of the currency symbol and positive and/or negative signs, etc, in supported currencies.
- Date formatting - How exactly do you know what a date like "04/01/05" means? In the US it means April 1st, 2005, but in other countries it might be read as January 4th, 2005, or even January 5th 2004. This class knows how to format an ambiguous date properly so that your customers always interpret them correctly. It will also convert date strings such as the one I mentioned above into a Flash Date object according to the specified locale, so that your users can quickly type dates in their native format and you can simply treat it as a date without having to think about the format.
- Collation - This is another one you may not think about very often, but in the standard ASCII sort used in Flash, the letter "Å" actually comes after the letter "Z", even though it really should come before the letter "A". What this means is that people whose language uses accented characters have to scroll to the bottom of a (supposedly) alphabetically ordered list in order to find a word that should actually be at the very top of the list. This feature uses the included quicksort method to sort arrays of data using the proper locale-specific collation order.
- Quicksort - The quicksort is simply a different sort function than the one that comes built into Flash. It is not necessarily a better sort function, but it happens to be slightly faster at sorting certain types of data, which happen to be the most common types of data that users need to sort (small and/or partially sorted lists of words). This function takes any array and sorts it using the specified compare function, just like the built in sort function. You can even tell the quicksort to do an ASCII sort, just like the built in sort, only using the internal ASCII compare function. You can also use the built in sort function, but pass the locale-specific compare function, causing the built in sort to properly collate locale-specific data.
- Supported locales -†
- af_ZA - Afrikaans locale for South Africa
- am_ET - Amharic language locale for Ethiopia
- ar_AE - Arabic language locale for United Arab Emirates
- ar_BH - Arabic language locale for Bahrein
- ar_DZ - Arabic language locale for Algeria
- ar_EG - Arabic language locale for Egypt
- ar_IN - Arabic language locale for India
- ar_IQ - Arabic language locale for Iraq
- ar_JO - Arabic language locale for Jordan
- ar_KW - Arabic language locale for Kuwait
- ar_LB - Arabic language locale for Lebanon
- ar_LY - Arabic language locale for Libyan Arab Jamahiriya
- ar_MA - Arabic language locale for Morocco
- ar_OM - Arabic language locale for Oman
- ar_QA - Arabic language locale for Qatar
- ar_SA - Arabic locale for Saudi Arabia
- ar_SD - Arabic language locale for Sudan
- ar_SY - Arabic language locale for Syrian Arab Republic
- ar_TN - Arabic language locale for Tunisia
- ar_YE - Arabic language locale for Yemen
- az_AZ - Azeri language locale for Azerbaijan (latin)
- be_BY - Belarusian locale for Belarus
- bg_BG - Bulgarian locale for Bulgaria
- bn_BD - Bengali language locale for Bangladesh
- bn_IN - Bengali language locale for India
- br_FR - Breton language locale for France
- br_FR@euro - Breton locale for France with Euro
- bs_BA - Bosnian language locale for Bosnia and Herzegowina
- ca_ES - Catalan locale for Catalonia
- ca_ES@euro - Catalan locale for Catalonia with Euro
- cs_CZ - Czech locale for the Czech Republic
- cy_GB - Welsh language locale for Great Britain
- da_DK - Danish locale for Denmark
- de_AT - German locale for Austria
- de_AT@euro - German locale for Austria with Euro
- de_BE - German locale for Belgium
- de_BE@euro - German locale for Belgium with Euro
- de_CH - German locale for Switzerland
- de_DE - German locale for Germany
- de_DE@euro - German locale for Germany with Euro
- de_LU - German locale for Luxemburg
- de_LU@euro - German locale for Luxemburg with Euro
- el_GR - Greek locale for Greece
- el_GR@euro - Greek locale for Greece with Euro
- en_AU - English locale for Australia
- en_BW - English locale for Botswana
- en_CA - English locale for Canada
- en_DK - English locale for Denmark
- en_GB - English locale for Britain
- en_HK - English locale for Hong Kong
- en_IE - English locale for Ireland
- en_IE@euro - English locale for Ireland with Euro
- en_IN - English language locale for India
- en_NZ - English locale for New Zealand
- en_PH - English language locale for Philippines
- en_SG - English language locale for Singapore
- en_US - English locale for the USA
- en_ZA - English locale for South Africa
- en_ZW - English locale for Zimbabwe
- es_AR - Spanish locale for Argentina
- es_BO - Spanish locale for Bolivia
- es_CL - Spanish locale for Chile
- es_CO - Spanish locale for Colombia
- es_CR - Spanish locale for Costa Rica
- es_DO - Spanish locale for Dominican Republic
- es_EC - Spanish locale for Ecuador
- es_ES - Spanish locale for Spain
- es_ES@euro - Spanish locale for Spain with Euro
- es_GT - Spanish locale for Guatemala
- es_HN - Spanish locale for Honduras
- es_MX - Spanish locale for Mexico
- es_NI - Spanish locale for Nicaragua
- es_PA - Spanish locale for Panama
- es_PE - Spanish locale for Peru
- es_PR - Spanish locale for Puerto Rico
- es_PY - Spanish locale for Paraguay
- es_SV - Spanish locale for El Salvador
- es_US - Spanish locale for the USA
- es_UY - Spanish locale for Uruguay
- es_VE - Spanish locale for Venezuela
- et_EE - Estonian locale for Estonia
- eu_ES - Basque locale for Spain
- eu_ES@euro - Basque language locale for Spain with Euro
- fa_IR - Persian locale for Iran
- fi_FI - Finnish locale for Finland
- fi_FI@euro - Finnish locale for Finland with Euro
- fo_FO - Faroese locale for Faroe Islands
- fr_BE - French locale for Belgium
- fr_BE@euro - French locale for Belgium with Euro
- fr_CA - French locale for Canada
- fr_CH - French locale for Switzerland
- fr_FR - French locale for France
- fr_FR@euro - French locale for France with Euro
- fr_LU - French locale for Luxemburg
- fr_LU@euro - French locale for Luxemburg with Euro
- ga_IE - Irish locale for Ireland
- ga_IE@euro - Irish locale for Ireland with Euro
- gd_GB - Scots Gaelic language locale for Great Britain
- gl_ES - Galician locale for Spain
- gl_ES@euro - Galician locale for Spain with Euro
- gv_GB - Manx Gaelic locale for Britain
- he_IL - Hebrew locale for Israel
- hi_IN - Hindi language locale for India
- hr_HR - Croatian locale for Croatia
- hu_HU - Hungarian locale for Hungary
- hy_AM - Armenian language locale for Armenia
- id_ID - Indonesian locale for Indonesia
- is_IS - Icelandic locale for Iceland
- it_CH - Italian locale for Switzerland
- it_IT - Italian locale for Italy
- it_IT@euro - Italian locale for Italy with Euro
- iw_IL - Hebrew locale for Israel
- ja_JP - Japanese language locale for Japan
- ka_GE - Georgian language locale for Georgia
- kl_GL - Greenlandic locale for Greenland
- ko_KR - Korean locale for Republic of Korea
- kw_GB - Cornish locale for Britain
- lt_LT - Lithuanian locale for Lithuania
- lug_UG - Luganda locale for Uganda
- lv_LV - Latvian locale for Latvia
- mi_NZ - Maori language locale for New Zealand
- mk_MK - Macedonian locale for Macedonia
- ml_IN - Malayalam language locale for India
- mr_IN - Marathi language locale for India
- ms_MY - Malay language locale for Malaysia
- mt_MT - Maltese language locale for Malta
- nl_BE - Dutch locale for Belgium
- nl_BE@euro - Dutch locale for Belgium with Euro
- nl_NL - Dutch locale for the Netherlands
- nl_NL@euro - Dutch locale for the Netherlands with Euro
- nn_NO - Nynorsk language locale for Norway
- no_NO - Norwegian locale for Norway
- oc_FR - Occitan Language Locale for France
- pl_PL - Polish locale for Poland
- pt_BR - Portuguese locale for Brasil
- pt_PT - Portuguese locale for Portugal
- pt_PT@euro - Portuguese locale for Portugal with Euro
- ro_RO - Romanian locale for Romania
- ru_RU - Russian locale for Russia
- ru_UA - Russian locale for Ukraine
- se_NO - Northern Saami language locale for Norway
- sk_SK - Slovak locale for Slovak
- sl_SI - Slovenian locale for Slovenia
- sq_AL - Albanian language locale for Albania
- sr_YU - Serbian locale for Yugoslavia
- sr_YU@cyrillic - Serbian locale for Yugoslavia (Cyrllic)
- sv_FI - Swedish locale for Finland
- sv_FI@euro - Swedish locale for Finland with Euro
- sv_SE - Swedish locale for Sweden
- ta_IN - Tamil language locale for India
- te_IN - Telgu language locale for India
- tg_TJ - Tajik language locale for Tajikistan
- th_TH - Thai locale for Thailand
- ti_ER - Tigrigna language locale for Eritrea
- ti_ET - Tigrigna language locale for Ethiopia
- tl_PH - Tagalog language locale for Philippines
- tr_TR - Turkish locale for Turkey
- tt_RU - Tatar language locale for Tatarstan
- uk_UA - Ukrainian locale for Ukraine
- ur_PK - Urdu Language Locale for Pakistan
- uz_UZ - Uzbek locale for Uzbekistan
- vi_VN - Vietnamese language locale for Vietnam
- wa_BE - Walloon locale for Belgium
- wa_BE@euro - Walloon locale for Belgium with Euro
- yi_US - Yiddish language locale for the US
- zh_CN - Chinese locale for Peoples Republic of China
- zh_HK - Chinese language locale for Hong Kong
- zh_SG - Chinese language locale for Singapore
- zh_TW - Chinese locale for Taiwan R.O.C.
† Note: I do not speak all of these languages, so I cannot read all of these locales to verify that they are correct. The data was taken from the i18n standard for internationalization, so these settings should be as accurate as any application which implements the i18n standards. |
| Flash
Business Tools is a developer's toolset, not a drop-in component.
They are for ActionScript 2.0/Flash Player 7 only, and they
are not backward compatible, due to the fact that they are written
in classes. Use of these tools will require at least some understanding
of object-oriented programming, class instantiation, and basic
ActionScripting. These tools are intended for use in business
applications, but may also be used for simpler projects, where
currency or date formatting may be required. |
|
|