user1605665 February 2016

How do i make the result of base64enc::base64decode human readable

I have some text that is base 64 encoded and want to decode it in R. The package im using is base64decode of the base64enc package. The problem I have is that its not human readable. How do i make it work

e.g. This is what i get from a text string that was endcoded from "exampleEncodedText"

 base64enc::base64decode("ZXhhbXBsZUVuY29kZWRUZXh0")
 [1] 65 78 61 6d 70 6c 65 45 6e 63 6f 64 65 64 54 65 78 74

For reference i encoded it on https://www.base64decode.org/

Answers


Julius February 2016

?base64decode says that this function decodes a base64-encoded string into binary data. So, using rawToChar gives a human readable character:

rawToChar(base64decode("ZXhhbXBsZUVuY29kZWRUZXh0"))
[1] "exampleEncodedText"

Post Status

Asked in February 2016
Viewed 2,048 times
Voted 4
Answered 1 times

Search




Leave an answer