r-lib / httr2

Make HTTP requests and process their responses. A modern reimagining of httr.
https://httr2.r-lib.org
Other
238 stars 59 forks source link

Think about encryption #24

Closed hadley closed 3 years ago

hadley commented 3 years ago
hadley commented 3 years ago

Might be better to use a character substitution cipher — it doesn't require any external package to implement, doesn't provide illusion of security that "encryption" might, and still protects against scraping attacks.

from <- c(letters, LETTERS, 0:9, "_")
to <- sample(from)

from1 <- paste0(from, collapse = "")
to1 <- paste0(to, collapse = "")

x <- chartr(from1, to1, "hello")
x
chartr(to1, from1, x)