Skip to content

Instantly share code, notes, and snippets.

View cfmitrah's full-sized avatar
🤓
Looking for new projects

Saravanamuthu Aka CF Mitrah cfmitrah

🤓
Looking for new projects
View GitHub Profile
@JamoCA
JamoCA / cfusion_encrypt.cfm
Last active January 28, 2018 16:11
ColdFusion 11 cfusion_encrypt & cfusion_decrypt function replacement (Works on ACF9-11 & Railo)
<cfscript>
/* ColdFusion 11 dropped the undocumented cfusion_encrypt & decrypt functions while Railo 4.2 still officially supports it.
This script will reestablish the built-in function. You can also use fusion_encrypt/decrypt (without the "c").
Based on 2005 blog post: http://www.barneyb.com/barneyblog/2005/10/28/cfusion_encryptcfusion_decrypt-udfs/ */
function fusion_binaryXOR(n1, n2){
n1 = formatBaseN(n1, 2);
n2 = formatBaseN(n2, 2);
return inputBaseN(replace(n1 + n2, 2, 0, "all"), 2);
}
function fusion_encrypt(string, key){
<!--- on initial request, run query --->
<cfset "session.#attributes.myactionfile#" = "" />
<cfsavecontent variable="datasorter_js">
<style type="text/css" title="currentStyle">
@import "css/datatables_table.css";
</style>
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {