We help IT Professionals succeed at work.
Get Started

Coldfusion encrypt function throws error if string has a pound sign. Please assist.

CFbubu
CFbubu asked
on
916 Views
Last Modified: 2013-12-24
Hi,

I was wondering how to encrypt a string in coldfusion if it contained special characters like the # sign. I am looking to also be able to use the decrypt function and be able to get back the original unencrypted string that would show the pound sign. Thanks!

Currently, as long as the string contains a pound sign, an error will be thrown. I was initially thinking of using the replace function to replace the pound signs in the string, but this will not work well as I want to be able to decrypt the original string and see the pound signs again. For example, if I chose to replace the pound signs with a '$' sign, than if the original string had both a # sign and a $ sign, than upon decryption, instead of having 1 # sign and 1 $ sign, I will have 2 $ signs.

Thanks for any insight on this.
Comment
Watch Question
CERTIFIED EXPERT
Most Valuable Expert 2015
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE