Check out the snippet explorer, specifically the binary functions on macromedia.com
http://www.macromedia.com/examples/cfgettingstarted/experience/index_content ..cfm These should help you understand the syntax of using the binary functions. Hth, ---nimer -----Original Message----- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 6:38 PM To: CF-Talk Subject: Re: How do I work with Base64 stuff? unpack takes a binary string and turns it into a list. the H* is the template used to pack/unpack...H* i think is a template to do a Hexdecimal pack/unpack. I would first try tobinary(tostring(packed_var)) and see where that leads and work form there...I do a good bit of perl programing but never use pack/unpack just remember it from one of my Perl Trainings :) Adam H On Mon, 7 Feb 2005 18:04:36 -0500, Troy Simpson <[EMAIL PROTECTED]> wrote: > I have some perl that I need to translate into ColdFusion and I am > having a little trouble with the understanding Base64 stuff. > > It has been almost 5 years since I have done any perl, so that is > giving a little trouble also. Especially the unpack statement. > > Does anyone know what this means and what it might look like in ColdFusion? > > # read modulus > chomp $modulus; > $modulus = unpack('H*', MIME::Base64::decode($modulus) ); > $modulus = substr($modulus, -$MessageHexChars); > $modulus = "0" x ($MessageHexChars - length($modulus)) . $modulus; > $PublicKeyModulus = $modulus; > > # read exponent > chomp $exponent; > $exponent = unpack('H*', MIME::Base64::decode($exponent) ); > $exponent = substr($exponent, -$MessageHexChars); > $exponent = "0" x ($MessageHexChars - length($exponent)) . $exponent; > $PublicKeyExponent = $exponent; > > Thanks, > Troy > > -- > Troy Simpson > Applications Analyst/Programmer, OCPDBA, MCSE, SCSA North Carolina > State University Libraries Campus Box 7111 | Raleigh | North Carolina > ph.919.515.3855 | fax.919.513.3330 > E-mail: [EMAIL PROTECTED] > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193491 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

