How to encrypt a file in coldfusion?

New Here ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

I have the necessity to encrypt an excel file generated by a web application developed by myself with Coldfusion. Currently my organization is using a third party software for accomplish the encryption piece with a PGP tool . My goal is to accomplish the encryption the excel file directly in the web application.

Any suggestion on how to accomplish this?

Thanks

Views

649

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

ColdFusion has EncryptBinary() and DecryptBinary() functions that might do what you need.

HTH,

^ _ ^

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

I would think that if you mean you want to use the PGP tool, against any file, you would want to consider using the CFEXECUTE tag, which lets you run any process on the server (that you would otherwise run from the command line on the server). It can be tricky to get it to work. See the docs, for sure.

/charlie


/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 23, 2018 May 23, 2018

Copy link to clipboard

Copied

There used to be a CFC that handled this: BonCode PGP for ColdFusion , but I believe it is pretty out of date with current libraries.  I'd suggest using a Java lib within CF.  I know there were some Java wrappers for bouncycastle.org that you might want to look at.

-Nic

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 08, 2019 Aug 08, 2019

Copy link to clipboard

Copied

LATEST

Another option is to add the excel file as an attachment to a PDF then password protect the pdf, which basically means encrypting the PDF and its contents.  All of which can be done with CF.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines