generatesecrate key

April 25, 2019
Explorer 5 posts
Followers: 2 people
0

generatesecrate key

Explorer 5 posts
Followers: 2 people
April 25, 2019

This is my code for which i have written to encript..bt instead of AES i need to give my value..i mean i should generate secrate key in the form of surveyId_InviteId ….help me with this

this is my code:

<cfset InviteArray=[1,2,3,4,5,6,7,8,9,10]>

<cfset surveyID=1>

<cfset encryptArray=arrayNew(1)/>

<cfloop from=”1″ to=”#arraylen(InviteArray)#” index=”j”>
<cfset encryptionKey = generateSecretKey( “surveyID_InviteID” ) />

<cfset inviteandandSurvey=surveyID&InviteArray[j]>
<cfset EncryptedSurveyID = encrypt(inviteandandSurvey,encryptionKey,”surveyID_InviteID”,”hex”) />
<cfset decoded = decrypt(EncryptedSurveyID,encryptionKey,”surveyID_InviteID”,”hex”) />

<cfset encryptArray[j]=”#EncryptedSurveyID#”>
<cfdump var=”#encryptArray[j]#”></br>
</cfloop>

Comments (0)
Add your comment