Also, when you use Encrypt() it will convert to binary format. Therefore,
before storing in a non-binary compatible field or database you need to
convert the encrypted string to base64 via ToBase64(). After extracting the
information from the database for decryption use ToBinary(), then
ToString(), then Decrypt(). This is required because ToBinary() is needed to
convert back from base64, but, Decrypt() takes a string as its first
argument so you need to convert the binary string to a string string ;),
then Decrypt(). Whew, did you get all of that?

Here are examples:

Encrypt()
---------
#ToBase64(Encrypt(FORM.CC_Number, "#APPLICATION.str_Key#"))#


Decrypt()
---------
#Decrypt(ToString(ToBinary(qry_GetUserInfo.CC_Number)),
"#APPLICATION.str_Key#")#


Justin MacCarthy
----- Original Message -----
From: "Mark W. Breneman" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, September 27, 2000 3:46 PM
Subject: Encrypting a credit card field...


> Good day,
>
> I am looking for a solution for encrypting a credit card field with CF 4.5
> and SQL 7.
>
> I know about CFX_PGP.  It sounds like just what I need but I would like to
> know if there are other solutions.  Does any one know of  any other
> encryption custom tag or of a stored proc for SQL 7 that will encrypt a
> field with a fair amount of security?
>
> Mark W. Breneman
> -Cold Fusion Developer
> -Network Administrator
>   Vivid Media
>   [EMAIL PROTECTED]
>   www.vividmedia.com
>   608.270.9770

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to