Learn R Programming

cookiemonster (version 0.1.0)

encrypt_vec: Encrypts/Decrypts a vector

Description

Used internally to encrypt/decrypt the value column of your cookie jar.

Usage

encrypt_vec(vec)

decrypt_vec(vec)

Value

list of encrypted elements (for encrypt_vec); vector of decrypted elements (for encrypt_vec).

Arguments

vec

A vector of values to encrypt

Details

If you save valuable cookies, for example login information, you should encrypt them with a personalised password. This can be set with, e.g., Sys.setenv("COOKIE_KEY" = "megageheim") or in an .Renviron file.

Examples

Run this code
enc <- encrypt_vec(c("foo", "bar"))
decrypt_vec(enc)

Run the code above in your browser using DataLab