Entries for month: August 2005

What is Flash Remoting?

Ever wonder what people are talking about when you hear the words Flash Remoting? Or do you think you know what it is but would like a deeper explanation? Well the fine people at ASFusion.com have defined it quite well, including sample code. Check it out...

http://www.asfusion.com/blog/entry/introduction-to-flash-remoting

No Comments

DateFormat and TimeFormat mask shortcuts

Do you ever forget the syntax for the DateFormat and TimeFormat functions? I do, especially for TimeFormat. Well ColdFusion has built-in mask shortcuts: short, medium, long and full. View examples below...

<cfoutput>
#DateFormat(Now(), "short")# #TimeFormat(Now(), "short")#
#DateFormat(Now(), "medium")# #TimeFormat(Now(), "medium")#
#DateFormat(Now(), "long")# #TimeFormat(Now(), "long")#
#DateFormat(Now(), "full")# #TimeFormat(Now(), "full")#
</cfoutout>

Displays this:

short: 8/23/05 1:13 PM
medium: Aug 23, 2005 1:13:30 PM
long: August 23, 2005 1:13:30 PM PDT
full: Tuesday, August 23, 2005 1:13:30 PM PDT

No Comments

CFMX7 Strong Encryption

ColdFusion MX 7 adds strong encryption support to the Encrypt and Decrypt functions. In addition to the legacy algorithm used in Encrypt, and Decrypt - ColdFusion MX 7 now makes it incredibly easy to use AES, Blowfish, DES, and Triple DES encryption. It also adds the ability to encode the encrypted string using three different binary encoding algorithms Base64, Hexidecimal, and the UUEncode algorithm.

Here's an example:

<!--- options for algorithm are CFMX_COMPAT (default), AES, BLOWFISH, DES, and DESEDE --->
<cfset algorithm = "AES">
<!--- encoding options, Base64, hex, or uu --->
<cfset encoding = "hex">

<!--- generate a key --->
<cfset key = GenerateSecretKey(algorithm)>

<cfset str = "This is my secret string." >
<cfset enc = Encrypt(str, key, algorithm, encoding)>
<cfset dec = Decrypt(enc, key, algorithm, encoding)>

<cfoutput>
   <pre>
   string=#str#
   encrypted=#enc#
   decrypted=#dec#
   key=#key#
   algorithm=#algorithm#
   </pre>
</cfoutput>

No Comments

Welcome to DCFusion.com

Welcome to DCFusion.com! This website is dedicated to bringing you info and tutorials on ColdFusion, Flash and Flex. Check back often and see what DCFusion has for you...

No Comments