Skip to main content
Known Participant
February 3, 2011
Question

Translate code from PHP to Coldfusion (SHA1 Encryption)

  • February 3, 2011
  • 1 reply
  • 1015 views

Hi everyone,

I have this bit of code in PHP which I want to do in Coldfusion but I have no idea. Can anyone help me out with this one?

Will the IC_Checksum value be the same in Coldfusion as it would be in PHP?

PHP Code:

$IC_CheckSum = SHA1($Encryptioncode . "|" . IC_Currency . "|" . IC_PaymentMethod . "|" . IC_Issuer);

Coldfsuion Code:

???

Thanks!

This topic has been closed for replies.

1 reply

Owainnorth
Inspiring
February 4, 2011

I see, so you want to hash a value? Have you tried the ambiguously-named hash() function?

Adobe Docs

And yes, two identical strings hashed in an identical algorithm should be identical regardless of the technology that did the work.

Known Participant
February 4, 2011

Great, thanks!!