I have a question about the cipher/decipher functions.
I need to save some data in a collection and I want to cipher before saving, and then store the ciphered data. I have seen a cipher function in freemarker for this.
Once this is done, I have a Web Interface where I need to query some of this ciphered data, so I need to query my collection in JS, decipher data in JS and then show it in the WI. However the cipher/decipher functions I've seen are used from freemarker, and because of my needs, I would need to cipher in a process from freemarker and after that, decipher in a WI from JS.
How can I achieve it?
Thank you very much in advance,
Best regards.
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/492c71d4-7b44-47fd-9d0b-d3fbd635362d%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.
In order to make the CAPI, I would need the possible values for the string algorithm (for both cipher and decipher). If I choose the options in the doc they are not recognized (I attach a sample code I've tried and the console result)
________
__CODE__
<#assign key = generate_key("fujitsu")>
<#assign cadena = "hola mundo!">
<#assign algo = "CBC">
<#assign cadenaCifrada = cipher(cadena, key, algo)>
${cadena}
${cadenaCifrada}
<#assign registro>
{"cifrado" : ${cipher(cadena, key)}, "original" : "${cadena}"}
</#assign>
${registro}
____________
___RESULT___
Error while processing <#assign key = generate_key("fujitsu")>
<#assign cadena = "hola mundo!">
<#assign algo = "CBC">
<#assign cadenaCifrada = cipher(cadena, key, algo)>
${cadena}
${cadenaCifrada}
<#assign registro>
{"cifrado" : ${cipher(cadena, key)}, "original" : "${cadena}"}
</#assign>
${registro}
java.security.NoSuchAlgorithmException: Cannot find any provider supporting CBC
So, How can I cipher and decipher choosing (the same) algorithm?
Thanks again and regards.
On Tuesday, December 13, 2016 at 10:52:43 AM UTC+1, Pankaj Kumar wrote:
> Hi Javier,
>
>
> No direct method to decipher the text is available in java script (like in freemarker API), so you can achieve this by either of following two approach:-
> Please create a Composite API (CAPI) to fetch the collection data sending query in input parameter of CAPI and decipher it using freemarker method and return result.
> You can use any third party js library to decipher the data and include this in web-interface.
>
>
>
>
>
> Thank you,
> Pankaj Kumar
> Fujitsu RunMyProcess Support
>
>
> On Tue, Dec 13, 2016 at 2:18 PM, J.M. <javiermm...@gmail.com> wrote:
> Hi,
>
>
>
>
>
> I have a question about the cipher/decipher functions.
>
> I need to save some data in a collection and I want to cipher before saving, and then store the ciphered data. I have seen a cipher function in freemarker for this.
>
>
>
> Once this is done, I have a Web Interface where I need to query some of this ciphered data, so I need to query my collection in JS, decipher data in JS and then show it in the WI. However the cipher/decipher functions I've seen are used from freemarker, and because of my needs, I would need to cipher in a process from freemarker and after that, decipher in a WI from JS.
>
>
>
>
>
> How can I achieve it?
>
>
>
>
>
> Thank you very much in advance,
>
> Best regards.
>
>
>
> --
>
> Fujitsu - RunMyProcess
>
> ---
>
> You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
>
> To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
<#assign key1 = generate_key("fujitsu")><#assign cadena = "hola mundo Pankaj Test!"><#assign cadenaCifrada = cipher(cadena, key1)><#assign origText = decipher(cadenaCifrada.ciphered, cadenaCifrada.iv, key1)>${origText}
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/75b91c8b-9820-430a-8ea9-906e7c48a2bc%40runmyprocess.com.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/eb8dbd17-3cd5-4467-a4a4-c2adae334b62%40runmyprocess.com.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/72a3a222-0312-465b-bf40-16a95d3fc89f%40runmyprocess.com.
Richard MangaSupport & Training ManagerRunMyProcess |
|
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/30d61820-add2-47d8-a368-864dedda7df9%40runmyprocess.com.