Jeff,

I downloaded an eval of DynCrypto and gave it a try.

Usually it is very hard to figure out how passwords are turned into 
128-bit keys, but since DynCrypto only offers one hash function - SHA1 - 
a little experimenting showed that they use the first 128 bits (32 hex 
digits) of the SHA1 hash of the password as the key.

ZeroBytePadding is a bit unusual, but fortunately it was one of the 
seven padding methods available in BouncyCastle.

Try this, where myPassword is the password and myCipherText is the 
encrypted data:

--------------------------------------------------
<cfset key  = 
ToBase64(BinaryDecode(Left(Hash(myPassword,"SHA1"),32),"Hex")) >

<cfset myClearText = Decrypt(myCipherText, key, 
"CAST5/ECB/ZeroBytePadding", "Base64")>
--------------------------------------------------

myClearText should be the decrypted data.
Hope it works for you.

-tom-

J W wrote:
> BTW Dyncrypto is is the third party object.
> 
> On 8/30/07, J W <[EMAIL PROTECTED]> wrote:
>> Tom,
>>
>> Got a real interesting part here. The company is giving me keys that are
>> NOT 128bit and they are alphanumeric. Do you have any idea how to pad or
>> create a key for cast128 that are currently like 9 alpha numeric characters
>> long. In no way is that a 128bit key. So there must be some type of padding
>> of that key. The company I am working with on this isn't very knowledgeable

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:287506
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to