HMAC Algorithms and Encoding?
I'm working on a Cybersource Authorization form, which has a PHP sample page. I'm trying to use the hmac() function in CF10. However, the documentation on it is lacking to say the least. Parameters Parameter Required\Optional Description message Required The message to transmit. The message can be a String or a byte array. key Required The secret key to create HMAC. The key can be a String or a byte array. algorithm Optional Algorithm used. encoding Optional Encoding to be used. No where can I find the algorithms or encoding options that can be used. The example itself is of little use. Anyone have any links, lists etc, where I can find some? Thanks Sandy Clark About Web ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359247 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: HMAC Algorithms and Encoding?
Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. On Tue, Sep 9, 2014 at 8:34 AM, Sandra Clark sclarkli...@gmail.com wrote: I'm working on a Cybersource Authorization form, which has a PHP sample page. I'm trying to use the hmac() function in CF10. However, the documentation on it is lacking to say the least. Parameters Parameter Required\Optional Description message Required The message to transmit. The message can be a String or a byte array. key Required The secret key to create HMAC. The key can be a String or a byte array. algorithm Optional Algorithm used. encoding Optional Encoding to be used. No where can I find the algorithms or encoding options that can be used. The example itself is of little use. Anyone have any links, lists etc, where I can find some? Thanks Sandy Clark About Web ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359248 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: HMAC Algorithms and Encoding?
Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359249 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: HMAC Algorithms and Encoding?
Sandy, what are you trying to encrypt? I ran into a similar issue recently trying to use AES 256 encryption for SFTP On Sep 9, 2014 10:47 AM, Sandra Clark sclarkli...@gmail.com wrote: Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359250 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: HMAC Algorithms and Encoding?
Sandy, Looking at the example in the HMAC() docs, they prefixed the algorithm type with HMAC. Maybe if you try HMACSHA-256, to see if it works? On Tue, Sep 9, 2014 at 10:46 AM, Sandra Clark sclarkli...@gmail.com wrote: Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359251 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: HMAC Algorithms and Encoding?
Thanks I'm trying to encrypt payment information for a group using CyberSource. I found documentation on encrypt() that specified using HMAC-SHAx (where x could be 256). Got the same error. http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=funct ions_e-g_01.html. CF10 documentation for encrypt is not as useful Since I don't have time to try every iteration that it could possibly be, I finally gave up, found Ben Nadel's Crypto library and it worked out of the box. But really, Adobe do the documentation correctly. HMAC Creates Hash-based Message Authentication Code for the given string based on the algorithm and encoding. Hash-based Message Authentication Code (HMAC) is used to verify the data integrity and authenticity of a message transmitted. It involves a cryptographic hash function in combination with a secret key. The cryptographic hash function can be Message Digest 5 (MD5), Secure Hash Algorithm (SHA), and so on. See also SessionInvalidate, Session Rotate. Example h2HMAC Test/h2 cfset x=hmac(Hi There,key1,HMACRIPEMD160) cfoutput#x#/cfoutput None of this tells me anything. Especially since I can't find any reference to HMACRIPEMD160 (hoping that would lead me to something) other than that HMAC documentation or some PDF's that are generated from the Wiki Pages and the above mentioned CF8 page, which again lists HMAC-SHA256. -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 11:01 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, Looking at the example in the HMAC() docs, they prefixed the algorithm type with HMAC. Maybe if you try HMACSHA-256, to see if it works? On Tue, Sep 9, 2014 at 10:46 AM, Sandra Clark sclarkli...@gmail.com wrote: Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359252 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: HMAC Algorithms and Encoding?
I found that there are certain things that ColdFusion doesn't support 256 bit encryption for. SFTP and CFHTTP among others. The solution is to download and install the updated encryption library from Sun. I can post details when I'm not on my phone. On Sep 9, 2014 11:22 AM, Sandra Clark sclarkli...@gmail.com wrote: Thanks I'm trying to encrypt payment information for a group using CyberSource. I found documentation on encrypt() that specified using HMAC-SHAx (where x could be 256). Got the same error. http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=funct ions_e-g_01.html. CF10 documentation for encrypt is not as useful Since I don't have time to try every iteration that it could possibly be, I finally gave up, found Ben Nadel's Crypto library and it worked out of the box. But really, Adobe do the documentation correctly. HMAC Creates Hash-based Message Authentication Code for the given string based on the algorithm and encoding. Hash-based Message Authentication Code (HMAC) is used to verify the data integrity and authenticity of a message transmitted. It involves a cryptographic hash function in combination with a secret key. The cryptographic hash function can be Message Digest 5 (MD5), Secure Hash Algorithm (SHA), and so on. See also SessionInvalidate, Session Rotate. Example h2HMAC Test/h2 cfset x=hmac(Hi There,key1,HMACRIPEMD160) cfoutput#x#/cfoutput None of this tells me anything. Especially since I can't find any reference to HMACRIPEMD160 (hoping that would lead me to something) other than that HMAC documentation or some PDF's that are generated from the Wiki Pages and the above mentioned CF8 page, which again lists HMAC-SHA256. -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 11:01 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, Looking at the example in the HMAC() docs, they prefixed the algorithm type with HMAC. Maybe if you try HMACSHA-256, to see if it works? On Tue, Sep 9, 2014 at 10:46 AM, Sandra Clark sclarkli...@gmail.com wrote: Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359253 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFTRY / CFCATCH not working
I have a script that returns image properties to me (below). After years of using it I've hit some sort of file that crashes it. The error I'm getting is: Numbers of source Raster bands and source color space components do not match null I'm assuming that from a corrupt image file, but the real problem is I wrapped this in a cftry / cfcatch (as shown below) and it's ignoring the CFTRY and giving me a hard error. cftry cfscript function get_imageinfo(imgfile){ jFileIn = createObject(java,java.io.File).init(imgfile); ImageInfo = StructNew(); ImageObject = createObject(java,javax.imageio.ImageIO).read(jFileIn); -THIS IS THE OFFENDING LINE imageFile = CreateObject(java, java.io.File); imageFile.init(imgfile); sizeb = imageFile.length(); sizekb = numberformat(sizeb / 1024, 9.99); sizemb = numberformat(sizekb / 1024, .99); get_imginfo = StructNew(); get_imginfo.ImgWidth = ImageObject.getWidth(); get_imginfo.ImgHeight = ImageObject.getHeight(); get_imginfo.SizeKB = sizekb; get_imginfo.SizeMB = sizemb; get_imginfo.ImageFormat = ListLast(ListLast(imgfile, \), .); } /cfscript cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch /cftry It runs this in a loop over a bunch of images and works until it hits the bad file... but it's ignoring my CFTRY and still throwing a hard error. Anyone have any ideas on why the CRFTY/CFCATCH is not working. Is there a problem because I'm catching a cfscript block? Thanks Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359254 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFTRY / CFCATCH not working
If there is an error in your error handling code you will get a hard error. It may be because you are still attempting to work with the corrupt file in your catch. Change this: cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch To this: cfcatch type=Any/cfcatch ...and see if it makes the error go away. -Cameron On Tue, Sep 9, 2014 at 1:02 PM, Robert Harrison rob...@austin-williams.com wrote: I have a script that returns image properties to me (below). After years of using it I've hit some sort of file that crashes it. The error I'm getting is: Numbers of source Raster bands and source color space components do not match null I'm assuming that from a corrupt image file, but the real problem is I wrapped this in a cftry / cfcatch (as shown below) and it's ignoring the CFTRY and giving me a hard error. cftry cfscript function get_imageinfo(imgfile){ jFileIn = createObject(java,java.io.File).init(imgfile); ImageInfo = StructNew(); ImageObject = createObject(java,javax.imageio.ImageIO).read(jFileIn); -THIS IS THE OFFENDING LINE imageFile = CreateObject(java, java.io.File); imageFile.init(imgfile); sizeb = imageFile.length(); sizekb = numberformat(sizeb / 1024, 9.99); sizemb = numberformat(sizekb / 1024, .99); get_imginfo = StructNew(); get_imginfo.ImgWidth = ImageObject.getWidth(); get_imginfo.ImgHeight = ImageObject.getHeight(); get_imginfo.SizeKB = sizekb; get_imginfo.SizeMB = sizemb; get_imginfo.ImageFormat = ListLast(ListLast(imgfile, \), .); } /cfscript cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch /cftry It runs this in a loop over a bunch of images and works until it hits the bad file... but it's ignoring my CFTRY and still throwing a hard error. Anyone have any ideas on why the CRFTY/CFCATCH is not working. Is there a problem because I'm catching a cfscript block? Thanks Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359255 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFTRY / CFCATCH not working
Thanks, but that had no effect at all. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams -Original Message- From: Cameron Childress [mailto:camer...@gmail.com] Sent: Tuesday, September 09, 2014 1:25 PM To: cf-talk Subject: Re: CFTRY / CFCATCH not working If there is an error in your error handling code you will get a hard error. It may be because you are still attempting to work with the corrupt file in your catch. Change this: cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch To this: cfcatch type=Any/cfcatch ...and see if it makes the error go away. -Cameron On Tue, Sep 9, 2014 at 1:02 PM, Robert Harrison rob...@austin-williams.com wrote: I have a script that returns image properties to me (below). After years of using it I've hit some sort of file that crashes it. The error I'm getting is: Numbers of source Raster bands and source color space components do not match null I'm assuming that from a corrupt image file, but the real problem is I wrapped this in a cftry / cfcatch (as shown below) and it's ignoring the CFTRY and giving me a hard error. cftry cfscript function get_imageinfo(imgfile){ jFileIn = createObject(java,java.io.File).init(imgfile); ImageInfo = StructNew(); ImageObject = createObject(java,javax.imageio.ImageIO).read(jFileIn); -THIS IS THE OFFENDING LINE imageFile = CreateObject(java, java.io.File); imageFile.init(imgfile); sizeb = imageFile.length(); sizekb = numberformat(sizeb / 1024, 9.99); sizemb = numberformat(sizekb / 1024, .99); get_imginfo = StructNew(); get_imginfo.ImgWidth = ImageObject.getWidth(); get_imginfo.ImgHeight = ImageObject.getHeight(); get_imginfo.SizeKB = sizekb; get_imginfo.SizeMB = sizemb; get_imginfo.ImageFormat = ListLast(ListLast(imgfile, \), .); } /cfscript cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch /cftry It runs this in a loop over a bunch of images and works until it hits the bad file... but it's ignoring my CFTRY and still throwing a hard error. Anyone have any ideas on why the CRFTY/CFCATCH is not working. Is there a problem because I'm catching a cfscript block? Thanks Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359256 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFTRY / CFCATCH not working
Any particular reason you are not using cfscript versions of try/catch? Old version of CF? try { code goes here } catch(Any excpt) { code goes here } Given any thought to a different image processor to see if you get a different result? I'm thinking cfimage, assuming you are using at least CF8. -- --m@Robertson-- Janitor, The Robertson Team mysecretbase.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359257 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFTRY / CFCATCH not working
Numbers of source Raster bands and source color space components do not match null Where do you see this error? In the exception logs? Or is the thread just dying and outputting this and not continuing on? Also what CF Version, I know older versions seemed to have many more problems reading image files than more recent version. On Tue, Sep 9, 2014 at 1:33 PM, Robert Harrison rob...@austin-williams.com wrote: Thanks, but that had no effect at all. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams -Original Message- From: Cameron Childress [mailto:camer...@gmail.com] Sent: Tuesday, September 09, 2014 1:25 PM To: cf-talk Subject: Re: CFTRY / CFCATCH not working If there is an error in your error handling code you will get a hard error. It may be because you are still attempting to work with the corrupt file in your catch. Change this: cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch To this: cfcatch type=Any/cfcatch ...and see if it makes the error go away. -Cameron On Tue, Sep 9, 2014 at 1:02 PM, Robert Harrison rob...@austin-williams.com wrote: I have a script that returns image properties to me (below). After years of using it I've hit some sort of file that crashes it. The error I'm getting is: Numbers of source Raster bands and source color space components do not match null I'm assuming that from a corrupt image file, but the real problem is I wrapped this in a cftry / cfcatch (as shown below) and it's ignoring the CFTRY and giving me a hard error. cftry cfscript function get_imageinfo(imgfile){ jFileIn = createObject(java,java.io.File).init(imgfile); ImageInfo = StructNew(); ImageObject = createObject(java,javax.imageio.ImageIO).read(jFileIn); -THIS IS THE OFFENDING LINE imageFile = CreateObject(java, java.io.File); imageFile.init(imgfile); sizeb = imageFile.length(); sizekb = numberformat(sizeb / 1024, 9.99); sizemb = numberformat(sizekb / 1024, .99); get_imginfo = StructNew(); get_imginfo.ImgWidth = ImageObject.getWidth(); get_imginfo.ImgHeight = ImageObject.getHeight(); get_imginfo.SizeKB = sizekb; get_imginfo.SizeMB = sizemb; get_imginfo.ImageFormat = ListLast(ListLast(imgfile, \), .); } /cfscript cfcatch type=Anycfset get_imginfo.ImgWidth=0cfset get_imginfo.ImgHeight=0/cfcatch /cftry It runs this in a loop over a bunch of images and works until it hits the bad file... but it's ignoring my CFTRY and still throwing a hard error. Anyone have any ideas on why the CRFTY/CFCATCH is not working. Is there a problem because I'm catching a cfscript block? Thanks Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austin_williams ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359258 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFTRY / CFCATCH not working
It's a seven year old site but it's on a CF10 server. Tried using CFIMAGE but it's too slow. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359259 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: HMAC Algorithms and Encoding?
Try HMACSHA256 for the algorithm see http://cfdocs.org/hmac -- Pete Freitag - Adobe Community Professional http://foundeo.com/ - ColdFusion Consulting Products http://hackmycf.com - Is your ColdFusion Server Secure? http://www.youtube.com/watch?v=ubESB87vl5U - FuseGuard your CFML in 10 minutes On Tue, Sep 9, 2014 at 11:22 AM, Sandra Clark sclarkli...@gmail.com wrote: Thanks I'm trying to encrypt payment information for a group using CyberSource. I found documentation on encrypt() that specified using HMAC-SHAx (where x could be 256). Got the same error. http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content=funct ions_e-g_01.html. CF10 documentation for encrypt is not as useful Since I don't have time to try every iteration that it could possibly be, I finally gave up, found Ben Nadel's Crypto library and it worked out of the box. But really, Adobe do the documentation correctly. HMAC Creates Hash-based Message Authentication Code for the given string based on the algorithm and encoding. Hash-based Message Authentication Code (HMAC) is used to verify the data integrity and authenticity of a message transmitted. It involves a cryptographic hash function in combination with a secret key. The cryptographic hash function can be Message Digest 5 (MD5), Secure Hash Algorithm (SHA), and so on. See also SessionInvalidate, Session Rotate. Example h2HMAC Test/h2 cfset x=hmac(Hi There,key1,HMACRIPEMD160) cfoutput#x#/cfoutput None of this tells me anything. Especially since I can't find any reference to HMACRIPEMD160 (hoping that would lead me to something) other than that HMAC documentation or some PDF's that are generated from the Wiki Pages and the above mentioned CF8 page, which again lists HMAC-SHA256. -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 11:01 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, Looking at the example in the HMAC() docs, they prefixed the algorithm type with HMAC. Maybe if you try HMACSHA-256, to see if it works? On Tue, Sep 9, 2014 at 10:46 AM, Sandra Clark sclarkli...@gmail.com wrote: Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359260 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFTRY / CFCATCH not working
Looks like the code you are using is bhImgInfo() from cflib, with only very slight changes. There's more than one way to skin that cat: https://gist.github.com/vikaskanani/6256084 looks more robust in the catch department. Maybe a little too robust, but it also separates out the file read from the createObject statement. -- --m@Robertson-- Janitor, The Robertson Team mysecretbase.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359261 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFTRY / CFCATCH not working
not an answer to your question, but have you tried using ImageMagick or cfx_openimage instead ? I have found both to be more reliable than CF's built in image handling. On Tue, Sep 9, 2014 at 6:56 PM, Robert Harrison rob...@austin-williams.com wrote: It's a seven year old site but it's on a CF10 server. Tried using CFIMAGE but it's too slow. Robert Harrison Director of Interactive Services Austin Williams Advertising I Branding I Digital I Direct 125 Kennedy Drive, Suite 100 I Hauppauge, NY 11788 T 631.231.6600 X 119 F 631.434.7022 http://www.austin-williams.com Blog: http://www.austin-williams.com/blog Twitter: http://www.twitter.com/austi ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359262 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: HMAC Algorithms and Encoding?
Thanks Pete! -Original Message- From: Pete Freitag [mailto:p...@foundeo.com] Sent: Tuesday, September 9, 2014 2:11 PM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Try HMACSHA256 for the algorithm see http://cfdocs.org/hmac -- Pete Freitag - Adobe Community Professional http://foundeo.com/ - ColdFusion Consulting Products http://hackmycf.com - Is your ColdFusion Server Secure? http://www.youtube.com/watch?v=ubESB87vl5U - FuseGuard your CFML in 10 minutes On Tue, Sep 9, 2014 at 11:22 AM, Sandra Clark sclarkli...@gmail.com wrote: Thanks I'm trying to encrypt payment information for a group using CyberSource. I found documentation on encrypt() that specified using HMAC-SHAx (where x could be 256). Got the same error. http://help.adobe.com/livedocs/coldfusion/8/htmldocs/help.html?content =funct ions_e-g_01.html. CF10 documentation for encrypt is not as useful Since I don't have time to try every iteration that it could possibly be, I finally gave up, found Ben Nadel's Crypto library and it worked out of the box. But really, Adobe do the documentation correctly. HMAC Creates Hash-based Message Authentication Code for the given string based on the algorithm and encoding. Hash-based Message Authentication Code (HMAC) is used to verify the data integrity and authenticity of a message transmitted. It involves a cryptographic hash function in combination with a secret key. The cryptographic hash function can be Message Digest 5 (MD5), Secure Hash Algorithm (SHA), and so on. See also SessionInvalidate, Session Rotate. Example h2HMAC Test/h2 cfset x=hmac(Hi There,key1,HMACRIPEMD160) cfoutput#x#/cfoutput None of this tells me anything. Especially since I can't find any reference to HMACRIPEMD160 (hoping that would lead me to something) other than that HMAC documentation or some PDF's that are generated from the Wiki Pages and the above mentioned CF8 page, which again lists HMAC-SHA256. -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 11:01 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, Looking at the example in the HMAC() docs, they prefixed the algorithm type with HMAC. Maybe if you try HMACSHA-256, to see if it works? On Tue, Sep 9, 2014 at 10:46 AM, Sandra Clark sclarkli...@gmail.com wrote: Tried that, I am now getting an error telling me that An error occurred while generating HMAC. Error: Algorithm SHA-256 not available. HASH() documentation is showing SHA-256 *sigh* -Original Message- From: Dean Lawrence [mailto:dean...@gmail.com] Sent: Tuesday, September 9, 2014 9:53 AM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Sandy, I do believe that you can use any algorithm that the hash function supports. Take a look at the documentation for hash and you will see what options you have. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359263 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: HMAC Algorithms and Encoding?
Does SHA256 require the Java Cryptography Extension be installed, or is that just SHA512 and above? -Carl V. On 9/9/2014 11:36 AM, Sandra Clark wrote: Thanks Pete! -Original Message- From: Pete Freitag [mailto:p...@foundeo.com] Sent: Tuesday, September 9, 2014 2:11 PM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Try HMACSHA256 for the algorithm see http://cfdocs.org/hmac -- Pete Freitag - Adobe Community Professional http://foundeo.com/ - ColdFusion Consulting Products http://hackmycf.com - Is your ColdFusion Server Secure? http://www.youtube.com/watch?v=ubESB87vl5U - FuseGuard your CFML in 10 minutes On Tue, Sep 9, 2014 at 11:22 AM, Sandra Clark sclarkli...@gmail.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359264 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: HMAC Algorithms and Encoding?
I would take a guess that it does, I needed to do it to get AES 256 to work for SFTP On Sep 9, 2014 4:05 PM, Carl Von Stetten vonner.li...@vonner.net wrote: Does SHA256 require the Java Cryptography Extension be installed, or is that just SHA512 and above? -Carl V. On 9/9/2014 11:36 AM, Sandra Clark wrote: Thanks Pete! -Original Message- From: Pete Freitag [mailto:p...@foundeo.com] Sent: Tuesday, September 9, 2014 2:11 PM To: cf-talk Subject: Re: HMAC Algorithms and Encoding? Try HMACSHA256 for the algorithm see http://cfdocs.org/hmac -- Pete Freitag - Adobe Community Professional http://foundeo.com/ - ColdFusion Consulting Products http://hackmycf.com - Is your ColdFusion Server Secure? http://www.youtube.com/watch?v=ubESB87vl5U - FuseGuard your CFML in 10 minutes On Tue, Sep 9, 2014 at 11:22 AM, Sandra Clark sclarkli...@gmail.com wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359265 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Not able to read a RSS feed from a WordPress website
Thanks Dave, If I use a browser, I can see the feeds. Using a feed reader in Google Chrome browser, I can notice the feeds load correctly. Are you using a browser from the machine running CF? No, the machine running CF cannot access the website. I get a message that the request timed out. But, the server admin cannot tell me what could be causing it. 1000's of people can access the website properly from their computers. Message:Connection refused by the specified host on the specified port. ... 1. What could have caused a working WordPress RSS feed which was parsed correctly by ColdFusion till last week to stop suddenly? 2. How can I resolve the issue? Looks like the CF server can't connect to that host on that port. This could be all kinds of things, but it probably doesn't actually have anything to do with CF itself. Perhaps the CF server is on a network segment that can't access this server. Perhaps the DNS entry changed for the WP server, and the CF server hasn't updated its cache. Etc, etc, etc. Well, the CF service was restarted and so was the server, so if the DNS entry changed, CF should have updated its cache. 1. Should I change the below line in C:\ColdFusion9\runtime\jre\lib\security\java.security #networkaddress.cache.ttl=-1 to something like networkaddress.cache.ttl= 14400 2. Also, does CF9 cache a positive lookup forever? Meaning if http://www.testsite.com/?feed=rss2 was on IP address A.B.C.1 when CF cached it, it will not update its cache when the feed's IP address changes to A.B.C.10 I appreciate your assistance and time. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359266 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Not able to read a RSS feed from a WordPress website
If I use a browser, I can see the feeds. Using a feed reader in Google Chrome browser, I can notice the feeds load correctly. Are you using a browser from the machine running CF? No, the machine running CF cannot access the website. I get a message that the request timed out. But, the server admin cannot tell me what could be causing it. 1000's of people can access the website properly from their computers. Just to clarify: from the machine running CF, if you use a browser, can you get to the site correctly? If the server admin can't tell you why a machine he or she manages can't get to a remote server, you need to replace your server admin. Well, the CF service was restarted and so was the server, so if the DNS entry changed, CF should have updated its cache. 1. Should I change the below line in C:\ColdFusion9\runtime\jre\lib\security\java.security #networkaddress.cache.ttl=-1 to something like networkaddress.cache.ttl= 14400 2. Also, does CF9 cache a positive lookup forever? Meaning if http://www.testsite.com/?feed=rss2 was on IP address A.B.C.1 when CF cached it, it will not update its cache when the feed's IP address changes to A.B.C.10 If you can't get to the site from a browser on the machine running CF, I wouldn't bother messing with CF - the problem isn't with CF. If you can get to the site from a browser on the machine running CF, but CF itself can't get to it, there's probably some sort of DNS caching issue within CF itself. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359267 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Not able to read a RSS feed from a WordPress website
you need to do some basic tests, which your server admin should have already done. for a start ping the domain from the cf server, does this work and do you get the right IP, if not then it is a dns issue. make sure that someone has not created an entry in the local hosts file. On Wed, Sep 10, 2014 at 2:51 AM, Dave Watts dwa...@figleaf.com wrote: If I use a browser, I can see the feeds. Using a feed reader in Google Chrome browser, I can notice the feeds load correctly. Are you using a browser from the machine running CF? No, the machine running CF cannot access the website. I get a message that the request timed out. But, the server admin cannot tell me what could be causing it. 1000's of people can access the website properly from their computers. Just to clarify: from the machine running CF, if you use a browser, can you get to the site correctly? If the server admin can't tell you why a machine he or she manages can't get to a remote server, you need to replace your server admin. Well, the CF service was restarted and so was the server, so if the DNS entry changed, CF should have updated its cache. 1. Should I change the below line in C:\ColdFusion9\runtime\jre\lib\security\java.security #networkaddress.cache.ttl=-1 to something like networkaddress.cache.ttl= 14400 2. Also, does CF9 cache a positive lookup forever? Meaning if http://www.testsite.com/?feed=rss2 was on IP address A.B.C.1 when CF cached it, it will not update its cache when the feed's IP address changes to A.B.C.10 If you can't get to the site from a browser on the machine running CF, I wouldn't bother messing with CF - the problem isn't with CF. If you can get to the site from a browser on the machine running CF, but CF itself can't get to it, there's probably some sort of DNS caching issue within CF itself. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359268 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm