sql server - Using SQL to decrypt ColdFusion -


i have legacy coldfusion 9 / mssql website encrypted data migrate platform. data aes encoded command

<cfset string = encrypt(#string#, cryptkey, "aes/cbc/pkcs5padding", "hex") /> 

i use sql stored procedure decrypt data , move mssql database having difficulty decoding data. have idea best way achieve this.

thanks looking

you can use coldfusion decrypt data , move database. this:

<cfquery name="getdata" datasource="[datasource_name]">     select [uniqie_id],[column_name]      [table] </cfquery>  <cfloop query="getdata">     <cfset variables.temp = decrypt(#getdata.column_name#, [cryptkey], "aes/cbc/pkcs5padding", "hex")>     <cfquery name="decryptdata" datasource="[datasource_name]">         update [table]         set [column_name] = <cfqueryparam cfsqltype="cf_sql_varchar" value="#variables.temp#">         [uniqie_id] = getdata.uniqie_id     </cfquery> </cfloop> 

you can use clr udf in sql server stated in post:

aes encrypt in c# decrypt in t-sql


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

dataset - MPAndroidchart returning no chart Data available -

post - imageshack API cURL -