Hello All,
Below is the code snippet from Ruby.
Digest::SHA256.base64digest('')
I need to generate the same in Appian and pass it to the integration header parameter, please let me know if anyone has done this before.
Thank You,
Sneha.
Discussion posts and replies are publicly visible
Can you clarify on what you mean exactly by "base64 digest string"? What is your input and what is your desired output? If, for example, it just requires translation of a string to Base64, this can be done OOtB.
Hello Mike,
Thank You for the response.
I need to get the equivalent hash value of the given string. First, need to get the SHA256 hash of the given string and convert the value to base64.
I've done using Java code and exposed it as an Appian function.
Great work!!!
Have you tested the limits of characters for this code?
Alexis Díaz Fajardo said:limits of characters
Within reason. Do you have anything specific in mind?
To confirm - i just tested it on a 10,000 character randomly-generated Lorem Ipsum text, and it worked in less than 5 seconds. I guess I'd hesitate to call it on text much longer than this, just for performance concerns.
Thats nice to hear. Im asking because the plugin Base64 Expressions have in its functions a character limit of 150.
Alexis Díaz Fajardo said:character limit of 150
yikes
edit: have you tested this: a few comments there suggest the limit is actually more than 150 characters now (in spite of what they have published on the description page). I updated my version of the plug-in and it seems to take upwards of 1600 characters now (the old one did break at 152, instead of 150 oddly).
I have not. Anyway, 10,000 characters sounds better than 1,600 right? :)
Hi Mike Schmitt , Could you please help me in my requirement.My input is in Text format, I need to convert it into Base64 format. How can I achieve this?
sri123 said:I need to convert it into Base64 format. How can I achieve this?
Did you try the expression rule(s) I pasted above? They're pretty straight-forward...
Yes, it is actually converting base64 to text, but I need to convert text to base 64. I tried using encodebase64string() function, but it is having some limitation of 150 characters. Could you please suggest me the other ways of converting text to base 64?
sri123 said:Yes, it is actually converting base64 to text, but I need to convert text to base 64.
I have at least 2 different rules posted above. One converts base64 to text, and the other converts text to base64. Are you saying you've tried both of them? It seems to me like you've probably missed one.
Sorry Mike, Missed this one. Thank you soo much. This works.
great, thanks for confirming (BTW if you want to "verify" my old answer(s) here that'd be great here too - i notice nobody else ever did, lol)
Yes, I already tried verifying the answer but could not be able to do it. The reason may be because the owner of the conversation is different.
Just out of curiosity, does that change if you click this first?
yes, done Verified