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.
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?
Mani001 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
I tried your code & it isn't decoding Euro symbol. Here is a sample from my encoded text - "U2ltaWxhYyBBZHZhbmNlIMOiIFIwMzUxMjNQ". Can you please check. Unfortunately, I can't use decodebase64string since it has a size limitation of 2000 characters.
Hi Mike,
I tried your code and it is failing to decode Euro symbol. Here is the same from my encoded text "U2ltaWxhYyBBZHZhbmNlIMOiIFIwMzUxMjNQ". Unfortunately, I can't use decodebase64string() as it has size limitation to 2000 characters.
lalithap4822 said:failing to decode Euro symbol
Are you talking about the "â" character? Because that's what it looks like your example string contains. I'm unclear but for some reason my base64 back-parser is interpreting it as 2 characters instead of 1, which I'll look into - it could be an error in my parser, or some weird exception involving the convergence of character sets or something, i'm not terribly sure yet.