Description
If a single logical value is stored without encryption, it isn't recovered correctly and throws an error in line 9 of encrypt.R. I discovered this while storing a binary checkbox input value in a Shiny app. The problem is actually a bigger one with RJSONIO (I think), but it would be easily worked around on your end. A simplified version of what's going on:
> fromJSON(toJSON(list(encV=FALSE,data=FALSE)))$data
Error in fromJSON(toJSON(list(encV = FALSE, data = FALSE)))$data : $ operator is invalid for atomic vectors
As opposed to this:
> fromJSON(toJSON(list(encV=FALSE,data=FALSE)))[["data"]]
[1] FALSE
RJSONIO seems to return lists of only logicals as a named logical vector. This could be fixed by changing return(js$data)
in line 9 of encrypt.R to return(js[["data"]])
. Or by switching to jsonlite.