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]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:193487
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to