I have a need to decode some base 64 string in java script server based in Hapi library In link I found that Hapi support base64 encode/decode but I can not find any example for how to use the relevant library. Does anyone has a good example?
Asked
Active
Viewed 143 times
0
-
can you post your code? – Ashish Modi Feb 11 '20 at 15:26
-
Does this answer your question? [How can you encode a string to Base64 in JavaScript?](https://stackoverflow.com/questions/246801/how-can-you-encode-a-string-to-base64-in-javascript) – Brahma Dev Feb 11 '20 at 15:26
-
Ashish Modi, no, I can not, I just needed a sample for how to decode a value using hapi library, as I specified in the question I did find it is possible to decode a value easily. Brahma Dev, you provided a solution but this solution will be need to be maintained, tested and so on, using a library from HAPI would decrease the amount of test that will be written for the code. Eventually I asked a friend and he provided a link to a the relevant documentation: https://hapi.dev/family/b64/api/?v=5.0.0 – Eran Friedland Feb 11 '20 at 15:47